Cross merging code changes into release branches

Please see [the original pull request](https://github.com/DynamoDS/Dynamo/pull/2781) for review details.