Move stacking to metadata and don't modify data.

Close #868.
Pretty confused why we are creating a new map per get call