fix getTheme() : the RegExp global object conflicts with local theme matches.
improve getTheme() fix to avoid possible useless match on location