[1.7.x] Fixed #23092: Squashing handles external dependencies