When adding a layer to an OWS Context it fails if the following condition has been met:
- the layer must have a NS in the nodeName (like: <wmc:Layer..>...</wmc:Layer>
The failure is due to the fact that the new layer is added in addLayer() to the parentNode before that method checks if that layer already exists. If found, the layer gets removed instantly.
Fixing this bug will show another bug: the testing whether the layer already exists in the context does not work properly: it will always add the new layer. I will fix this early next week unless someone beats me to it.