ent_remove should ALWAYS be the LAST FUNCTION played by your event.

ent_remove SHOULD NOT AT ALL be called in an event!
Event functions are actually executed during the engine function that caused the event, like a c_move, c_scan, or c_trace instruction of another entity. The event function itself should be simple. It normally should only transfer information to the entities' main function - it shouldn't perform instructions that can trigger events itself, displace entities, or change anything else in the level. Thus instructions like c_move, ent_create, ent_remove, c_trace etc. must not be performed