Fix OnBackStackChangedListener to properly detect when the Fragment has changed.