Fix --out-indent for the JSON outputter

Fixes #16673.