Dont use nested "ternary conditional" operators

Fixes #10123