Fix lua state references regarding stack asserts
(optionally) recursive table to hash conversion