Fixed outputting of layers if the corresponding theme has no layers and subthemes

See also http://tracker.deegree.org/deegree-services/ticket/401