Checks whether a given path is already shared (rebased).