Fix for #2044: don't overwrite the initial maxComponentDepth variable, as this will give the wrong value when there are multiple nested components.
Fix for #2044: don't overwrite the initial maxComponentDepth variable, as this will give the wrong value when there are multiple nested components.