Fix bug where we were accessing nodes by reference, not by id.