Fix issue 22

read masks were incorrect in the presence of write masks for operations
that aren't simple component-wise ops