Refactor the in-progress tuple swap work into a function in base class

Very minor nit: you can capitalize the "p" in swapWithInProgressGroupByKeyTuple.