avoid localsPush and localsPop with count == 0