Fixing bug where hierarchical models under HMC would lead to segfaults.