Improve typechecking of let-bindings