You'll need to change the mev_terminal_grab script a bit. This line
if(amp_read_var(AMP_FIRST_ACTIVE,amp_MONID) == NONE){
should be changed to
if(amp_read_var(AMP_FIRST_ACTIVE,amp_MONID) == NONE || amp_read_var(AMP_FIRST_ACTIVE + 1,amp_MONID) == NONE){
and now emptying either of the first two slots in the party (by going below 2 party members) should cancel the operation.
(Also, you probably want to update the message that is printed when this happens to read "2 monsters" instead of "1 monster", a little further down in the script)