Improve iterator error messages. Fixes #11.