fix bug in resurrected optimizeShifts not popping the stack; fixes slow2.test_python