Fix AttributeError in add_literal_node, thanks to @petli.