Dear Martin,
It's a very interesting question. Vernacular manuscripts from the Gangetic plain, Rajasthan, and Gujarat, from the late sixteenth through the eighteenth centuries, also exhibit inconsistencies in the use of graphemes like these (more so in the latter two regions). In those cases, I've wondered if it was due to itinerant scribes (known to work in the region) with little familiarity or investment in the texts, but in the end I don't think this sufficiently explains the phenomenon. I have not been able to discern any consistent orthographic logic in the instances that I have seen. Am curious to hear what others have to say.
Best,
Tyler