Tweaking the path validity check.