Fix #1425 Zindex issue
Merge pull request #608 from nlegoff/fix_1425

[3.8] Fix #1425 Zindex issue