Support empty document query rules, make CSS:Media only apply to actual media rules