Fixed issue #8541: str_replace seems to be replacing just the first occurrence of search string rather than all occurrences