Question: removing entries from list

I wanted to remove entry from a list that contain y=y or x=x in it. Here is an example

f:= (x-1)*y^4/(x^2*(2*y^2-1));
S:=[singular(f)]

Where I wanted to remove those entries highlighted above to obtain

This is below how I ended up doing it. I'd like to ask if there is a better or more elegent way. I had to use map, since could not get remove() to work on the original list in one shot. 

foo:= z->remove(has,z,{y = y,x = x});
map(foo,[singular(f)])

Which gives the output above.

Is there a better way to do this? I always learn when I find how to do something better.

Maple 2019.1

 

 

Please Wait...