fix Issue 10078 - std.string.indexOf fails at compile time

supersedes #1293

[Bugzilla 10078](http://d.puremagic.com/issues/show_bug.cgi?id=10078)