[#APOLLO-2129] Fixed issue where roles were replaced by their numeric array keys