Use updated source mapping standard syntax for legacy injection

Fixes #18248

(cherry picked from commit 06f4b6f2e4b6a57944251f7d242b6751520de937)