A fiasco at work isn’t the disaster you think. If anything, it provides a way out of the corner you painted yourself into.