Fix LearnBoost/mongoose#2521: use correct variable when checking remaining pres