Fix a bug in previous.

The any() expression fails if g is an atom, so simply use tableau_closed().