Fix for an invalid type cast when getting a 'public' tag.