This is sufficiently complex that it's worth checking if DRYing it out à la [`:parent`](https://github.com/cmcnulty/sizzle/blob/sizzle-174/src/sizzle.js#L1355) comes out any smaller.