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

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 "EditableFormHeading_versions" ("Level", "HideFromReports", "RecordID", "Version") VALUES (?, ?, ?, ?) 

Duplicate entry '1-1' for key 'RecordID_Version' (

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.