Fix issue #205 problem with the Transition controller calling beforeDeactivate and afterDeactivate sometimes when the view is not active.

(cherry picked from commit bbdd1b51d188433754bf767dd6f080981531f7bf)