I would suggest you use firebug or chrome debug tool and set a conditional break point at that line of code 46166 condition 'this.xtypesMap == undefined
Then re run the site.
The debugger will stop when the condition is met and you will be able to look at the stack trace and inspect objects and variables to get more information regarding state and the methods that are running to cause the issue.
Thanks, but I seem to have solved it. I have some XTemplates defined within extended abstract components that were the problem. I did not have the alias set on the extended AbstractComponent class and this was causing the error, though I don't know why.