fixed closure and let handling for valueOnly type inferencer