it happened to me few times lately that after submitting new question the formatting of inserted code was corrupted. I am 100% sure that it looked ok at the time I clicked
Post Your Question button.
I did copy&paste from my text editor (I use tabs to indent the code) into SO question box and then I was fixing the formatting.
I do not have any screen shots but you can probably go through all the versions of this question where I was reminded via comment to fix the formatting.