Problem in GtkSourceBuffer text tagging

I started to build an app for previewing Djot markup text while editing, the app is based on Gnome Text Editor. I’m using Djot’s javascript parser (launched within WebKitGtkWebView) to tag the text on the GtkSourceView, in order to highlight the source Djot text.

Here is the source code link, (branch appending_djot_previewer).

The problem is, when I’m trying to assign a new tag table (function defined here) to the GtkSourceView (parent instance of EditorDocument in this project), the GtkSourcebuffer is still tagging in markdown, not in Djot, and the following error apears:

(gnome-text-editor:2): Gtk-CRITICAL **: 22:59:42.086: set_table: assertion 'priv->tag_table == NULL' failed

Does anyone knows why and what that means? (As I understand this error apears when trying to set a new tag while there is already another tag named the same in the table, but I can’t find the place where it happens to disable it)