Fix stack overflow with specially crafted files
The file is not malformed per se, it just has a huge XRefStm chain and we end up exhausting the stack space trying to parse them all.
Having more than 4096 XRefStm seems like won't really happen on real life so break the flow at that point
Fixes #936 (closed)