Identified bug, removing debug output and pinpointing breaking optimization