Stop redundant checking of objects, which makes this method very slow
for very large files