Fix URI guessing.

URIs should be matched against a substring the length of the
currently-being-checked recognized scheme.