Fix recursive infinite loop.