Fixes #4157: make ordering case insensitive