uses: fail fast if invalid formula names are given

Fixes #20819.