I'm not sure this the best solution, but I reset my head to the commit just before the bad 'merge'. Then I found that by doing a cherry-pick of the merge commit and choosing the feature branch as mainline I could get the commit without the merge tracking:
git cherry-pick 1a168acc -m 1
Since this branch only had one more commit after this one, I just cherry picked that branch onto my new detached head and created a new branch, then merged master into the new branch without any problems.
If there had been a series of commits after the merge, I'm not sure what the correct solution would have been.