in my original comment the subcase check intentionally only happened after the first two checks. `get_subcases` is expensive, and doing it recursively could be even more expensive. no need to call it if either of the first two conditions are true.