Fixed extension of scene rect when inserting pairs in the middle.