I think it matters what you mean by flub.
There are a couple specific exceptions, but I think any of my colleagues in my department could teach any of our undergraduate courses in an emergency. Would they be the best person at it? No. Could they do a competent job for an emergency situation and be helpful to almost all the students in learning the material, even perhaps as they are just reading the textbook a week ahead of the students? Yes.
There are general mathematical skills of reading and understanding theorems, proofs, and definitions, and coping with abstract concepts. They are usually enough to get through any undergraduate material, and almost all mathematicians have mastered these skills in a general context well enough to learn and even teach all undergraduate material on their own.
There are of course exceptions, but they are unusual.
At a higher level, I wouldn't feel at all comfortable teaching a first-year graduate class in all but a few areas of mathematics, and I think I would not have a reasonable chance of learning some of these areas in a reasonable amount of time (but other areas I could), and I would not be able to do decent research in them even if I took as much time as I needed to retrain.