The LuaJIT version that Garry's Mod is using is outdated and that's bad. Here's why.

While changing stuff in one of my scripts, some parts of the new code behaved in a weird way,
so I decided to investigate.
I was able to create a simple example script that demonstrates what’s wrong:

Edit: Solved: http://forum.facepunch.com/showthread.php?t=1374457&p=44949236&viewfull=1#post44949236

Also going to mention that coroutines behave differently depending on if they were ran on the jit enviroment or not.