Maybe "cognitive dissonance" is actually the correct phrase, but I thought I've heard a different word or phrase for this specific type of internal conflict.
For example, what word or phrase might be used to describe Sally's rationalization below:
Bob: "Joe's plan is foolish. It will never work, and we'll be caught."
Sally: "It will work. You're just too dim to see the genius of it. Did you stop to think maybe getting caught is part of Joe's plan?"
And lets assume that Joe's plan truly is bad. Maybe Sally is dating Joe and doesn't want to acknowledge that Joe could make a mistake.