Restore the old definition of path_via

As per #454 / #451.