Make begin-invoke/end-invoke wrappers for generic delegates like Func/Action generic, similarly to 8eae1a7d721b37c9e16e77776d9774b2756dcc68.
Fix a typo introduced by c808ced1e2fa580762a8022754ded9dcaeef0a81.