Fix restore predefined export with more than 2 levels depth

issue3402
review1124003
(transplanted from 30b291e0bf4f17a0219b4572cee67e8fcc07acc7)

--HG--
extra : transplant_source : 0%B2%91%E0%BFO%17%A0%21%9BEr%CE%E6%7E%8F%CC%07%AC%C7