To avoid dead lock where a notifier will callback
into the engine to perform a further state transition
make sure we activate the state change notifiation
after locking and not during it.
Fixes bug 1301091
Change-Id: Ic81e15150e44d36489757372db32adfb5440feb4