optimized isPathBlocked()