Artifact transform disambiguation
Before this commit, the moment there were two transform path matching,
we failed and asked the user to disambiguate.
However there are cases where we can do disambiguation as paths are
equivalent and one is clearly better than the other.
This fixes the case when a shorter path is the suffix of a longer one.
Issue #6718