Fixed a bug in consolidate_penalties() that caused incorrect shift active_penalty value