infer_let
This PR fixes the dead `let` elimination code in the kernel's `infer_let` function. Closes #10475