Also Constant output dtype is whatever the constant passed to it is. In you case it would be at.as_tensor_variable(2) why gets converted to 8bit integer. However, Metropolis, (the generic sampler that gets assigned to this variable), does not respect this and sends a 32 or 64 bit proposal which is rejected.
You can specify c=at.constant(2, dtype="int64") to avoid this error but it is still inefficient to sample constants in the graph.