tessel/runtime#586 r=@kevinmehall: Adds fixes from colony-luajit branch.