[FIX] Core: Token.indexOf() returns offset when substring length = 0