Reconstruct the stylesheet and apply nesting rule