BS-8587, apply modifications during ImproveDebug merge. Diff done between changes before merge.
Commit before merge: a00609877f9a1aa1b942ccbfb095e8e6bea79777 - Commit after merge: e2336b22df560f7aabe8571726c16778fb456173