Code for the less magic was unnecessarily reading the entire input file twice.  Redundant read removed.
Merge pull request #7261 from otakucode/master

Code for the less magic was unnecessarily reading the entire input file ...