LPS-34070 Fix wrong source formatting logic