Line 2807 contains an if statement with a condition that _always_ evaluates to True:
```
If ($iValues -is [System.Object])
```
I believe the way it was meant to read is
```
If ($iValues -is [System.Object[]])
```
I.e. checking for whether the iValues variable is an array or a scalar.
```
If ($iValues -is [System.Object])
```
I believe the way it was meant to read is
```
If ($iValues -is [System.Object[]])
```
I.e. checking for whether the iValues variable is an array or a scalar.