fixing needle/haystack order when checking for theme and stylesheet paths