Logopolis . . . Plus, why did the Doctor want to fix the chameleon circuit all of a sudden?
That bit stems from the Keeper of Traken where the Doctor is reminded that the Master has a TARDIS with a fully functioning chameleon circuit and used it to good effect (from the Master's POV).
And, I'd say that story harkens back to Delgado's Master whose TARDIS routinely changed shapes for good effect (from a circus truck to a space ship). In Colony in Space (I believe), the Doctor notes that the Master's TARDIS is more advanced than his.
I think the Doctor felt insecure, over-matched and basically had his face rubbed in the fact that the Master's TARDIS is superior to his own. Particularly because it's been a long standing issue with the Master and the Doctor still hadn't fixed it!