Fixed one dead loop issue in the autogenlib.