Properly evaluate objects with overridden operators

Fixes bug #19570