SyncTeX: prevent stack overflow when freeing objects (fixes crash 18549, etc.)