Avoid un-necessary decode in startsWith/endsWith

As requested in #2503.

Perhaps it's overkill?
Well, I don't know. There's nothing conceptually wrong with it. That said, there's probably no real reason to add extra specific code to support it. Code that'd need to be reviewed and maintained. I'm just going to remove it.