How to duplicate layer with all sublayers and all objects in them

Thank you,
This script is not work well when source layer have child layer in Rhinoceros 5 SR13 64bit.

This script is correct, but layer.py (in SR13) is not good.

I found this issue about a year ago.

I checked layer.py in my computer( Rhinoceros SR13 64bit is installed) , but it seems not be fixed.