Crude fixes for quoted items

There are still quite a lot of cases where mixing
the ternary operator and quoted items doesn't work well.
It's unclear if that can be solved.