Thanks for the review and push. I also submit a test case for this bug. It fails in grep-2.18.146-ebf3, and succeeds in current master.