When calling 'vc-next-action' on an unregistered file, VC could choose a backend that is very far above this file in the directory hierarchy. In my case, it chooses SVN as backend (because I have one in my homedir) but I wanted it to choose the Git backend of the directory this file resides. This patch solves this issue by selecting the backend with the most specific (in fact, the longest string) path to the file.