Extending the handling for nested, empty elements