[TASK] Adjust to changed role behavior in Flow 2.4

Resetting the RoleRepository is no longer needed since roles are not
stored in the database any longer. This change resets the repository
only if it is available for backwards compatibility.