Deduplicate alternative `swap!` stuff