TRUNK-4114: Deletion of referenced role throws exception