v5.1.0: Changed the parameter passing order; bug fix
Changed the sequence of parameters for callbacks taking both the context and the triggering message for consistency with other language versions.
Fixes #7 - transition selection was favouring outer states over inner states.