Tweaking query logic in `is_active` to be simpler, and probably (very) slightly faster.
Merge pull request #2 from potatolondon/query_tweak

Tweak query logic