The short answer is that the formalising of townland boundaries and names in the 1830s also formalised the official spelling of townland names.
There were many problems involved in this formalising, often because Irish names were being recorded by non-speakers of the language:
"gh" was used to transcribe the guttural Irish "ch" as in "Connacht", to distinguish it from the palatal/dental English "ch" as in "check" or "church".
the final consonant of Irish "carraig" often had a hard sound "carrick" in the north, often a softer sound "carrig" in the south.
You don't even need two languages for such changes of spelling. A quiet English hamlet includes the attractively-named house "Upany Barn", whose owner said the name was taken from a nearby field. Research into documents of the early 1800s showed that the name given to the field when it was enclosed was "Upper New Field" - in a period of about 150 years, in a village of mostly literate people speaking the same language, prosaic "Upper New" had become poetic "Upany". Elsewhere in the same parish, the 1800s field-name "Shilpit Haines" (Scottish-English for "scalped (ie poor) enclosure") had become "Sherberdeans".
So don't be confused or purist about the spelling of names. Keep trying variations until you have as comprehensive a list of possibilities as your imagination can create. And keep a record of spellings you have tried, so that you don't have to start over if you return to the same name. To help this process, IreGaz can save the results of a search, including a record of your search-request.