Created attachment 194888 [details]
The image with max-width: 100% extends outside the grounds of a flex container. This recently broke and was noticed in Safari's Web Inspector.
See the reduced test case.
Created attachment 194889 [details]
Problem as Seen in Safari Web Inspector
Pretty sure it regressed in http://trac.webkit.org/changeset/146272 (it works correctly at r145978 for me). This should get fixed when bug 111790 is resolved.
As a work around, you can add min-width: 0 to the image.
The flexbox spec used to have a special min-width: auto that resolved to min-content, but since that resulted in unexpected behaviors most of the time, it got reverted. See http://lists.w3.org/Archives/Public/www-style/2013Feb/0364.html for the discussion. Bug 111790 is about going back to min-width: 0 as the default.