Be smarter about what to insert

Useful for cases like

![](http://snag.gy/fpbWW.jpg)