Fix for Mantis 1221 from Andrew Plotkin
Merge branch 'davidk'
Fix for 1267: Statistics (-s) output gives false maximums