Combine adjacent blocks with similar selectors