fix bad logic for identifying mediaquery blocks
refactor: separate method responsibilities
add test to insert before w/multi-ruled mediaquery