The culprit is in the getNames function declared at the top of scope.js
- getNames = function(attr){var names = [], last = 0;attr.replace(escapeReg, function($0, $1, index) {if (!$1) {names.push(attr.slice(last, index).replace(escapeDotReg,'.'));last = index + $0.length;}});names.push(attr.slice(last).replace(escapeDotReg,'.'));return names;}
It doesn't like the $0 argument. Changing $0 to foo, resolved the problem.
Thoughts?