preserve an asterisk at the start when escaping a search term

Fixes #12647 (look also there for test steps).

@jnfrmarks @craigpg @MorrisJobke @LukasReschke 


because of http://php.net/manual/en/function.substr.php#90581