Fixes #6979 by fetching attribute slugs instead of names.