[profiler] protect against unbalanced start()/end() calls
Expand createLayergroup profile