I'm not a fan of how we convert this to an old style list but I'm not entirely certain on a better method that doesn't include replacing the stack implementation (which isn't out of the question). Though given that ErlNifMapIterator is its own data type I'm not sure how we'd make this progressive cause we'll also have to worry about the scheduler yielding situation too.