[FEATURE] Use static instantiation with max depth check
Merge pull request #639 from RonXS/master

[FEATURE] Use static instantiation with max depth check