Check is any initial subsequence of path is a valid target.