You did all this with the wheel on the ground , so didn't shuffle re-stack/lose any of the headset parts them selves?
FWIW I Added a QBP Locking spacer* directly above the top headset race, just for those situations ..
So fork wouldn't fall out when I loosened the stem, with an integrated Headset..
*
Universal Cycles -- Problem Solvers Locking Headset Spacers