Occasionally when getting the positions for the bracket sets get_bracket_sets returns an incorrect end index, or it will return the position of none bracket sets that wrap lines.
usually there are multiple bracket sets within one another when the bug occurs
when this occurs the distance of the end index of the first pair is passed to the second set
if there is only one opening bracket and multiple closing brackets it only finds the first pair not both
if there is only one closing bracket and multiple opening brackets of the same type then it finds pairs for both even if they don't both meet up with the closing bracket
Occasionally when getting the positions for the bracket sets get_bracket_sets returns an incorrect end index, or it will return the position of none bracket sets that wrap lines.