Fix error when resolving an unversioned target specification.