Fix build.

 - needed to dereference optional function object

[#74774412] @evanweaver still need to test windows build.