Fixed depth sorting (again).

Hopefully this will be the last time.
Merge branch 'master' of https://github.com/ZimonD/ContextCG7