Fix bug in pm3 for filtered variables that led to crashes

Check for size of array failed with singleton dimension