--format=pretty: avoid calculating expensive expansions twice