WordPress MU Domain Mapping and Image uploads URLs

I am using WordPress MU Domain Mapping for an MU site.

Imagine that the initial install is main.com and my child site is set up at child.main.com and domain mapped to child.com

When I upload images to child sites the image URLs always reference the child.main.com url rather than the domain mapped url child.com

How can I fix this?
For example:

Main WPMU site:

Example Child site:

Typical image URL of image uploaded via web interface:

I want the URL to be on

I can manually edit HTML to reference it as:

But I want WP to natively store the URL as on the mapped domain.