#56 Rejig containsOpenLayer() to check for layerHieraarchyPath instead of name.
Some layers don't seem to have a layerhierarchy path, and these layers seem to have non-duplicated names (with other layers in the same server) I still use name in this case.