This appears to be a Blizzard bug. The line of code that's causing it is as follows...
Code:
SaveBindings( GetCurrentBindingSet() or 1 );
Which would imply that GetCurrentBindingSet() is returning an invalid value. I'm discussing it with Blizz now and we'll see if we can run down what's happening.