Fixes to catch up tcr-colonyjit branch.

Put these in the function as they don't need to be allocated globally. You're already assuming the stack's not broken by making function calls.