fix boolean flag comparison so large files don't consume memory

This was changing constructResult to true when it was set to false and therefore consuming lots of memory on large files.