Use the correct memoryAddress size when do a gathering write. Part of [#2680]