I think "the condition saṃhitāyām" mentioned by Jan, and implicitly by Jonathan, is the key. Authors and reciters have had different allegiances, so to speak, to this rule, but it's clear enough that for Pāṇini, sandhi rules were conditional upon contiguous speech. Letters transform when they touch each other, sonically, not when they do. not (nobody says "do. n't").
In the Nepalese MSS that I've been working with over the last few years, dating from ninth-sixteenth centuries, there is a variety of scribal (or spoken?) usage in all the directions that have been mentioned. Very often there is an anusvāra at the end of a śloka, suggesting rapid recitation with the following śloka. Sometimes, but more rarely, there are hiatuses inside a sentence. And so on. The attitude to sandhi application seems quite variable. I'm sorry to say, however, that I haven't kept note of these variations.