Fixed resources generator to accept complex type second class elements with a @ref instead of a @name.