It's not rel_to_screen, you should use vec_to_screen. The ClIPPED flag should work as well. However, if an entities CLIPPED flag is set that does not mean the entity is behind or besides the camera. It can also have its INVISIBLE flag set or be to close to or to far away from the camera.
Always learn from history, to be sure you make the same mistakes again...