Because the command is reusing space, you will see previous values in a list even if they are not now ‘valid’.
In a simple list in a command definition, the first two bytes of the parameter passed to the CPP and to the validity checker are a binary number which tells you the number of entries in the list.
Your validity checking program must look at this value and see how many values are ACTUALLY being returned. In the example you give, this will be 3 for the first call, and 1 for the second call.
In CL, nowadays (CLLE), you can use the %BIN function to return the value in a decimal variable. Previously, you would have had to use a sort of ‘lookup’ on a hex string to get a single number you could understand in your CL program