support for preserving object stacking

fix for issue #1636