Took Daniel's refactoring and debugged it. Specifically called
removeFold / removeSurrogateFold when setting the other