Merge "Base implementation of override_role for automatic role re-switch"