Only hide a fragment function with a variable if the variable has the type Closure.
Expand the Fragment test to cover this case.