Add support for relations to match multiple tags. Turned out to be a bit more involve...