Fix IndexOutOfBoundsException in the Message model

When connecting to my bouncer, Atomic sometimes crashes with an `IndexOutOfBoundsException` on `setSpan` (most notably when there are highlights involved).