diff --git a/generator/osm2type.cpp b/generator/osm2type.cpp index fb829fe6a7..6358deb88c 100644 --- a/generator/osm2type.cpp +++ b/generator/osm2type.cpp @@ -307,13 +307,15 @@ namespace ftype current = path.back().get(); // Next objects trying to find by value first. - ClassifObjectPtr pObj = - ForEachTagEx(p, skipRows, [¤t](string const & k, string const & v) - { - if (!NeedMatchValue(k, v)) - return ClassifObjectPtr(); - return current->BinaryFind(v); - }); + // Prevent merging different tags (e.g. shop=pet from shop=abandoned, was:shop=pet). + ClassifObjectPtr pObj = + path.size() == 1 ? ClassifObjectPtr() + : ForEachTagEx( + p, skipRows, [¤t](string const & k, string const & v) { + if (!NeedMatchValue(k, v)) + return ClassifObjectPtr(); + return current->BinaryFind(v); + }); if (pObj) {