Make sure all tags are in a list before merging for role deps

Fixes #6557