Changes to SubDAG extraction to hopefully make it slimmer and faster.