That's the beauty of being Terry Pratchett, you can steal anything you like and simply call it a parody or an homage
Not just Terry Pratchett. Ben Aaronovitch once said (regarding a Doctor Who
New Adventures novel of his), "I'd like to remind everyone that while talent borrows and genius steals, New Adventure writers get it off the back of a lorry, no questions asked.
"What have you been doing since you stole that antique TARDIS of yours, since you first landed on Skaro? Shouting 'Look at me!!! I'm not fighting a war!', while you battle the Daleks all the way through space and time."