User Defined Forms throwing "Duplicate entry for key" MySQL error.

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version: 3.6.5 & User Defined Forms 4.5.5

We support a long running Silverstripe website - currently on versions 3.6.5

Currently when a user tries to update a User Defined Form in the CMS they are returned a blank screen & the following error is generated in the silverstripe.log

INSERT INTO &quot;EditableFormHeading_versions&quot; (&quot;Level&quot;, &quot;HideFromReports&quot;, &quot;RecordID&quot;, &quot;Version&quot;) VALUES (?, ?, ?, ?) 

Duplicate entry '1-1' for key 'RecordID_Version' (http://www.example.com/admin/pages/edit/EditForm/1)

I cleared out the table & but the problem keeps coming back. It seems like it’s trying to Insert a row with the RecordID of 1 & Version of 1 - which already exists in the database.

Any ideas on how I can troubleshoot/ fix this?

For anyone else who stumbles across this - it can be fixed running /dev/build - but I didn’t find a permanent solution.