Wow. Thanks for sharing. I'll definitely try it. I've noticed the trouble you mention, and used 3.8 Flash in spite of it, because I like the model, but it's bit me more than once.
Also, 3.8 Flash for coding... I've done several experiments with the same prompt and same codebase against other models, and it's never turned out well for Flash against GPT Sol or Astra. No reason to use it for coding, either, except for quick scripts and prototypes, where it's nice because it's so fast.