Fixed a problem with the Lua51 tests that caused useless premature failues.
Fixed the Lua51 tests in their entirety.