This happened because the code iterated over the keys of a hashmap, which obviously were not guaranteed to be in the same order as those entries where added to the hashmap. We fix this by adding a "visitor" to the materialchunk, so we can iterate through it in order and retried the info we need.