Fix for BUG-13804 and additional test for multiple roles.