Bugfix. Elements should only be added if it's stack depth is less than the cache stack depth. Done by pederb.
Bugfix. Elements should only be added if it's stack depth is less than
the cache stack depth. Done by pederb.

Alexpux/Coin3D,Alexpux/Coin3D,Alexpux/Coin3D,Alexpux/Coin3D