Fix replace logic Original-merge: 2ddb15c784 Merged-by: joshuaboniface <joshua@boniface.me> Backported-by: Joshua M. Boniface <joshua@boniface.me>
2ddb15c784