Currently, the same BBCode cannot be nested in itself properly. Although this may sound like an edge case, certain situations, such as a spoiler within a spoiler, neccesitate it.
The likely cause is the use of indexOf methods of checking for what to include in a BBCode instead of a stack to simultaneously do tag validation and content checking.
This may not be a bug per se (hence why I classified this as a request) since BBCode parsing may be purposefully broken to prevent certain combinations (such as 10 spoilers nested with each other) from happening.