I mean we knew that gravity as we understood in terms of GR is not a full picture. As people figured out that the expansion of the universe was accelerating, which would be impossible if gravity was simply attractive. So I don’t think of dark matter as a glitch. It’s more like a placeholder we don’t understand yet.
Something that seems like a glitch to me is speed of light being a hard limit, but when you really dig into it you realize that certain limits determine the nature of the reality and they need to have some fixed value like the speed of light went Planck’s constant.