Fixed unit test failures

This pull request will be merged in directly to stabilize the build, it fixes regressions caused by [this](https://github.com/DynamoDS/Dynamo/pull/2941) and [that](https://github.com/DynamoDS/Dynamo/pull/2897) pull requests.

Hi @ikeough, since you're familiar with these codes, please take a look later. Thanks!