MDL-40241 core_completion: Minor fixes to provided patch

Thanks to Aaron Barnes and Jon Sharp for working on this issue.