The JavaScript is failing because an invalid selector is being inserted by the array-filter/array-filter-exclusion code. It's picking up the parent question code and appending it to an array row ID. This row doesn't exist so everything comes grinding to a halt.

I've attached a patch but could you please review it to make sure it doesn't screw up your fix for bug 04683?