Understanding the CIP configuration for cyclic substituents with hetero-oxygen atoms
CIP rules for cyclic substituents are different. See 
this question for the rules. (The rules are given in the question itself).

This will be the hierarchical digraph for the right side of the molecule.

 

The atoms encircled are the ghost atoms. From the digraph one can see why the compound is Z.