Fix cherry-picking conflicts

Cherry picking https://github.com/DynamoDS/Dynamo/pull/2474