WIP on workaround for getRichTokenStream bug