related to redmine issue #2898 and #1397 (z-shift)
Merge after !1272 (merged), this MR will probably have conflicts.