Fix a bunch of missing member const in GenericFunction.
Merge branch 'garth/fix-missing-const-genericfunction' into next