replaceAll: fix endless loop on empty search string