[bug workaround] limit the replacement search