You can't rebind keys in combat.
You can rebind them programitcally outside of combat.

The reason they nerfed this was to stop people from running bots that would dynamically rebind keys based on what needed done...