Fix infinite loop when loading debug info