fixed enumerate to handle non-const containers with const iterators (ie std::set
)