I'm using the memoir class to produce a LyX document that's mainly written in U.S. English but has several quotes that use British (UK) English. So when I put the document through LyX's spell check and came to words like "behaviours," I just marked them as UK English. But when I tried to compile the document, LaTeX threw an error saying the command "\foreignlanguage{british}{behaviours}" was undefined.
No problem, I thought. I'll just put a command in the document preface to load babel with both languages: \usepackage[british,american]{babel}. But this didn't work because LaTeX threw an error saying babel had already been loaded. But for the life of me, I can't find where babel is being loaded. The memoir manual says it does not duplicate the functionality of packages like babel, and babel is not in the list of packages memoir loads. So by a process of elimination, I can only guess that LyX is surreptitiously loading babel. But if so, shouldn't it be doing so with options for all the languages used in the document? (I.e., is this a bug in LyX?) This is happening using LyX 2.2.1 on an iMac running OS X 10.10.5 (Yosemite), with MacTeX 2016 and all packages updated to their latest version with the TeX Live utility. The Language settings in the LyX file are "English (USA)," with Encoding set to Unicode (utf8), and Language package set to "Automatic." How can I fix this problem? Thanks.