Remove a dead declaration.
A fix and a test case for gh-304 Iterator does not check the access

Add access checks in Lua iterators.