There's no doubt about that.
The recording of Cavanagh singing the song was on an RTE documentary about him some years ago. I believe they made the point he already wrote the poem with the tune in mind before Luke Kelly entered into it. It doesn't matter really.