I'd log this as an error, as you've tested that the realm doesn't contain the roleId already, so something must be pretty screwy for this to happen.