I've fixed the offsets problem (I made a mistake reading the values in HxD) and now the file closes without any request to be saved.
It seems that the only problem remains is that the first page will not load while the second will and the only difference is the stream length as a reference.
I have uploaded 2 files one with no indirect length and and one with. What can be the problem now?
https://files.acrobat.com/a/preview/09f97ce1-392e-4676-bd49-18ed7c331c8f