Fix Lightouse 1022

We need to store a reference to the function itself, not the result of the invoked function.