Fix stack exhaustion bug in Java class parser