clipping embedded flags within their bounds