add checks for locales/defaultLocale (bug 892612)