target: Fix possible integer underflow in UNMAP emulation