This PR changes how extensions are merged. Before, all extensions were merged unconditionally regardless of whether a patch succeeded. This was done to reduce memory overhead since the lookup map for the merge could be removed after all extensions were merged. Now, an extension of a patch is merged right before the patch is executed. This requires the lookup map to be kept in memory as long as the patches are executing. This should not be much of a problem. The maps are cleared after all patches were executed
This PR changes how extensions are merged. Before, all extensions were merged unconditionally regardless of whether a patch succeeded. This was done to reduce memory overhead since the lookup map for the merge could be removed after all extensions were merged. Now, an extension of a patch is merged right before the patch is executed. This requires the lookup map to be kept in memory as long as the patches are executing. This should not be much of a problem. The maps are cleared after all patches were executed