Fixes a bug that would prevent replacing multiple placeholders in a single string