target: Fix error checking for UNMAP commands