More sophisticated insertion of dummy nodes for heterogeneous layouts