This has been made a bit messy with commit 9f72780d, just split the "involved" and straightforward checks into two.