Add a check for uninferred type parameter

This fixes #19978. The bug was introduced by 570325d, where if the type
of an Fn has not been inferred (strs[0] is "_") we slice from 1 to 0.