I’ve just run through these on the latest version, and it does correctly remove the scoping for step 2 from the variable after deleting the step, so it does look like something we have since fixed.
I’ve searched through our issues list but haven’t been able to locate one specifically for this, so I can’t advise an exact version where the fix would be located.