Reduce cost of prepareInputs.
[PLAT-3246] Only shortcut the single ExternalId case if there are no escape characters.