v.23.7Bug Fix

Functions hasToken* Incorrect; Test Addition for Issue #43358

Functions hasToken* were totally wrong. Add a test for #43358 #51378 (Alexey Milovidov).