Fix invalid listname and listsize not handled correctly in set_size

https://github.com/minetest/minetest/issues/996
https://github.com/minetest/minetest/issues/997