b0b2e76e13
Previously, the different number of statements has led to some unexpected behavior. E.g., the resulting script can have duplicated declarations – one from the original script instead of some statement and one from the copy ^KT-60987