Use parent_id in query for descendants refs #6974
Added --json option to regen-derivatives ref#6975