I have the following code (edited for brevity). When I call addAttribute from an instance of Node, the attributes map updates correctly
addAttribute
Node
attributes