For quite some time now I've been having trouble with the hyphenation of Turkish text in mdframed environments. I have been unable to come up with a sane MWE that exhibits the problem. It only seems to happen in large documents and when it does or doesn't trigger seems to be quite context sensitive. First here's a working example of how I'm using mdframed to markup quoted content (in this case Scripture verses) differently than other quoted content. For reference the other quote visible here uses the quoting environment and Alan's big quotation mark trick and I have yet to see the quoting environment show the same problem*:

But here is the same document with a larger base font size and single column output:

Excuse me? Where did that word wrap / hyphenation breakage come from? I have not seen this sort of wrapping problem anywhere else in any of my documents except when using mdframed.
- The wrapping problem is not always on the first line, sometimes it will do this in the middle of a block. Example:

- It is not always at large font sizes, sometimes very small base sizes will do the same thing. Example:

- It is not always short lines, sometimes very long lines of content will still have trouble.
- Sometimes making subtle changes to the document margins, sizes etc. will make it go away—for example sometimes both slightly larger and smaller font sizes will work where one in the middle won't.
- One can usually make it go away by tweaking the
mdframedouter margins a little one way or another.
How do I stop this from happening? I work with a lot of auto-generated documents and I don't always have the option of fiddling with (or even of checking) the output but these wrap problems look really bad when they leak through. What other factors do I need to look into eliminating to trace this?
* Edit: Apparently this is not just an mdframed thing. In browsing through documents looking for examples and what they had in common, I found bit of similar breakage in a verse environment:

Se-vinç-ten hâlâ ina-na-ma-yan, şaş-kın-lık için-deki öğ-ren-ci-le-rineso I see nothing strange: the case where the word sticks out in the margin happens because there's no other way to typeset the paragraph, unless you help with some of the known tricks. – egreg Mar 23 '15 at 10:06içinso that the line isn't too long in the first place? And that doesn't even hold for many of these other examples as there are hyphenation points available in words that are being left whole and there should be no excuse for them ending up in my margins. Also I don't know what "known tricks" you might be referring to or how I could help it along. – Caleb Mar 23 '15 at 10:10Se-vinç-ten hâ-lâ ina-na-ma-yan, için-de-ki öğ-ren-ci-le-ri-ne,. If it matters I'm using polyglossia and xelatex. – Caleb Mar 23 '15 at 10:23polyglossiaa few more points are found, but just becausebabelsets the right hyphenation minimum at 3, whilepolyglossiasets it to 2. Bad line breaks should be taken care of when the document is in its final form; then you can decide what remedy to take. Since this text cannot be edited, you can try by locally setting\emergencystretchorsloppy(you find several examples in the site). – egreg Mar 23 '15 at 10:30mdframedenvironment as the line length for the text is shorter. For various approaches see http://tex.stackexchange.com/q/35/15925 and the FAQ links therein. – Andrew Swann Mar 23 '15 at 10:54