How can I prevent the new indexing bug from creating useless pages on Google?

Adding thousands of 404s via bad links on high-value product pages has a profound undeniable negative effect on SEO.

I don’t want anyone leaving the thread with the wrong idea.