Reverse-engineering the morphophonology of Gaelic