Fix one issue with media queries and detached rulesets, one to go
Fix some bugs with detached rulesets and media queries