It’s the noun へま + る to turn it into a verb and then conjugated to the past tense. It’s a lot like verbing nouns in English (see what I did there? ) very non standard but easily understood if you’re familiar with the language because of how verbs and conjugation work.
Heres a link on how it’s done with loan words that covers the basic principles
If I had to say,Ι think it’s meaning 10 or 12 here: