Players that use out of character knowledge to one up the GM should be punished by being uninvited. If everyone agrees otherwise, it is fine.Gygaxian advice to change rules because players learned them. In some printings of the DMG:
Later advice (ISTR in Dragon) suggests changing rules to thwart those reading the DMG.
But, personally, as a GM I will absolutely fireproof trolls at players that just happen to attack with their torches...