fixed bug with push_num and identical operands

fixed bug with infinite push_num loops and out of memory
removed is_duplicate