As expected, if you attempt to graft a package's dependency, and it's name + version is different length to the original dependency, then it will fail to graft.
Maybe if the length/version is different, then a symlink could be created in the store pointing to the new dependency, with a name/version that matches the length of the original dependency's store name? Perhaps this new name/version could be something like /gnu/store/...-original-dependency-name-gggggg, where 'g..' matches the length of the version of the original dependency. The many 'g's would make it clear that it is a graft. Then if someone looks in the store, they would see it's a symlink too.