This is fixed now. As it turns out, the bug was more devious than this case would imply. We had logic to ensure that only valid prefixes were saved. It was being triggered as expected, but it was the Entity::set() call that was failing unexpectedly. Specifically, this was caused by the prefix_id being set to a different value and then trying to reset it back to the original value; the latter wasn't detecting that the column value was changed as expected.