I don't have much else to explain, the title says a lot, to reproduce the issue, subscribe to onSquadSelectionPageChanged, start a new game, immediately go unequip the pilot and weapon from your first mech, do the same for the second, onSquadSelectionPageChanged should trigger as soon as your inventory has 4 items, with a current_page value of 2 (didn't test much more because my hook is pretty destructive)
I don't have much else to explain, the title says a lot, to reproduce the issue, subscribe to onSquadSelectionPageChanged, start a new game, immediately go unequip the pilot and weapon from your first mech, do the same for the second, onSquadSelectionPageChanged should trigger as soon as your inventory has 4 items, with a current_page value of 2 (didn't test much more because my hook is pretty destructive)