Fixes generic inference in functions with TypeGuard, refs #11780
#11797
+70
−9
TypeGuard, refs #11780
#11797