[python] fixed HaxeIterator.next when hasNext wasn't called before (closes #3191)