Seems like the episode numbers are set in stone before the seasons begin, based on scheduled guest stars, and then based on the guests availability, taping order will change but the production order remains the same (and I guess if a guest star cancels their appearance, whoever replaces them...