Don't pass k to lookupVar' and lookupFun' because k is closed over.