I think removing the ensureRange() call is a bad idea. For one, the subsequent patch isn't valid -- it cause the sewer PDF to hang.

The whole point of the patch is to avoid doing any work that might subsequently be thrown away. Your solution would be a partial fix -- depending on the load speed, those requests might be fulfilled by the time we're parsing. But they might not, so you could still end up doing wasted work.

There aren't that many calls to makeSubStream() anyway.