Fix property comparison

### What does it do ?

Fix a property comparison

### Why is it needed ?

Original code assigned a value to the property, instead of only comparing it, preventing some code execution

### Related issue(s)/PR(s)

* #9561