Fix bug with infered const temp vars.
Const temp regression test.