Move custom TERM comparison to InScreenSession()