Fix #814 sort problem in grep source