Use correct namespaces in for elements with base.

When using elements with a base from another namespace, the children of the base-element does not have the correct namespace set. This commit fixes this problem.

Including test.