[BUGFIX] inval() -> (int) regressions in ternaries

Change-Id: I0c105134ca9de463eed7c6a3760003b8694958ce
Resolves: #55923
Releases: 6.2
Reviewed-on: https://review.typo3.org/27576
Reviewed-by: Marcin Sągol
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel