Fix an error in the checks for stream integrity, add additional
check for streamend block and its position within the stream - should
give a definitive check that the stream's fine.