That the tune is 14 bars long doesn't help with the confusion! Then it starts again on the third not of the melody, so it's a strange form. As for the chords, the way I think of it, it's mostly in concert D major with a sort of functioning "bridge" in G minor, but the melody suggests Bb major 7, same scale notes as a G minor 9th. What makes the song work (again IMO) is the attitude, the rhythmic approach and those "prissy" tight 16th notes in the fourth phrase. I think it's well worth working on, so I continue to practice and explore it daily.