Avoid infinite loop caused by self-reproducing code