support for preserving object stacking
Merge pull request #1638 from joerozek/stacking

Support for preserving object stacking. Closes #1636.