-x overcomes -w in gnugrep, and it should here as well. Flip it off as needed to avoid confusing other parts of grep.