Better check for open generic types in probing expression. Fixes #15422