Prior to this commit, we were normalizing history whenever layers were added (either via AddLayer or ReuseLayer),
but when rebasing, if the new base image has empty layer history, the information about the empty/non-empty aspect of the history will be lost if "preserve history" isn't set on the image.
Prior to this commit, we were normalizing history whenever layers were added (either via AddLayer or ReuseLayer), but when rebasing, if the new base image has empty layer history, the information about the empty/non-empty aspect of the history will be lost if "preserve history" isn't set on the image.
Prior to the "v1 refactor" in https://github.com/buildpacks/imgutil/pull/257 we were also normalizing history before saving, so this is restoring previous behavior.