Check image parent before adding anchor
I've encountered a case where Mediator is causing an issue. If a user wraps an image in an anchor, but the image's natural width is wider than the container's width, Mediator also wraps the image in an anchor, and you end up with an image inside an anchor inside another anchor.
Edit: Disregard this, I derped. This is actually Vanilla's core doing this in
global.js. I somehow switched tabs and didn't notice