Add unreachable goal detection