Are you sure by the reference ? I suppose this will modify the inner representation of Rbac container by doing this (as you are changing RoleInterface instance to string)