Fix issue for threshold reduced form mapping with posterior samples;

Manual cherry-pick from commit aa4e81f84bc7bf80cba888943263e6458a236065