Fixes #5474: list-compatible-inputs fails when there is no which command