Fixed #21634 -- Prevented hiding ImproperlyConfigured when command not found

Thanks nikolay.v.golub@gmail.com for the report.