Yeah, I know about this bug as well. TMs don't disappear after use. What I do know is that this isn't always the case. Earlier in my savefile, right after I got headbutt, I used the TM and it actually went away after use. But after I bought a mass of TMs from the Goldenrod shop, (including another headbutt) every TM in my inventory no longer would be used teaching a pokemon the move.
A theory I have about this is that owning too many TMs is what caused them all to be re-useable for some reason. Maybe the goldenrod gym leader's TM rollout is what caused the bug for all I know. I can't say for certain, but I do think Goldenrod city is a linking factor with the bug if anyone wants to hunt down further information about it.