Per !9106 (comment 154009)
@ezsh Try with this.
I'd say a simpler way was to move the $PATH check down and apply it after the case ... esac.
case ... esac
mentioned in commit 9b8cfe2d
merged