Eddie wrote several tunes with such angular melodies; Mean Greens is my favourite. The part resembling Freedom Jazz Dance is in the middle, before the sesond and third solos. Ambidextrous is another one, more or less a new version of Mean Greens.
What is remarkable about Mean Greens is that the boogaloo riff is present from start to finish, selfless Cedar Walton plays is all the way through except when he solos and Eddie and Roy Codrington play it for him. Walton also plays the riff all through Freedom Jazz Dance, freeing Ron Carter and Billy Higgins. These guys groove the hell out of this tune!
I just finished Johnny Dankworth's autobio, "Jazz in Revolution" (1998), and came across JD's explanation for why Jazz isn't and will never be popular:
......."jazz is a music for the minority. It can only be truly understood and evaluated by people gifted with 'chordal ears'- IOW, those lucky folk who can listen to the improvisational skills of a soloist and still hear the underlying chord structure. So jazz music can only by luck become popular in the wider sense.,and can rarely enjoy the financial security and mass acclaim which goes with that phenomenon. Thus most jazz musicians remain skilled, dedicated and poor, and even a jazz world-star name like Dizzy Gillespie's was and still is for that matter-unfamiliar to most people in the country of his birth."
He used Diz as an example, because he was working with him at the time, and was a very close friend of his.
This explains a lot.