Improve regex for ThemeNameCheck.

There should be either a space or a start of line before a word to
avoid false positives.