ported fix for #6164 to sphinx

was already supported for BETWEEN but not for LIKE

fixes #6164