Parse all references (and create inverse references) before building nodes.