Fix for constraints against many reference points.