Fix bug 1029241: Make test case selector match better