Edit: Corrected Below.
I figured out the problem, been tinkering for a solution. It doesn't seem to like escape characters such as [[ which allows you to use brackets in strings.
Edit:
Got it to work. I just commented out
text = renpy.substitute(text)
inside replace_tooltip(). It's still ignoring pieces surrounded by the new tag, correctly displaying the usual tooltips, and no longer throwing an error for [[. Not sure if this will bite my arse down the line but it seems to be working great for the moment.
Sorry for the trouble and thank you for all your help and work!