make sure nodeDefinitions is a copy