A note on Gibbs and Markov random fields with constraints and their moments