Avoid overwriting NameNodeMap methods with attribute values.

This is consistent with browser behavior.
Added test for #723.