Fix wrong parent test in create_leveling

issue3246
review920002