Put back welf.window check in cas_updateStyling for performance reasons.