Enumerable fixes

Changes as discussed in https://github.com/fog/fog/commit/989acc71baddbe4197816d755bb36c72c582acae
Plus a fix for a bug I discovered with the new tests.