fix duplicate label exceptions when comments are involved