Based on this question, I added style to my arrows using a stereotype. However, this does not appear to work for short arrows:
@startuml
<style>
.a {
LineThickness 3
Linecolor red
}
</style>
participant alice
alice -> bob : msg
alice ->x? <<a>> : red
@enduml
PlantUML Server

To format short arrows, I used the style workaround mentioned for LineStyle in the checked answer of the above question. I also used this for other places where the formatting doesn't work for stereotypes or inline (e.g. certain group format parameters). However, I have run into an issue with this now: After using it in the same diagram for a while, it stops working.
(Note that I am creating rather complicated diagrams. Although I have broken them up, I was asked to provide a single combined diagram as well, which is where this occurs.)
After a couple hundred of these <style></style> changes, things break. (On the PlantUML server, the default size of the render images appears to be being used, so you can't see it there. But you can see it at the bottom of the rendered SVG version.)
@startuml
<style>
.a {
LineThickness 5
LineColor green
}
</style>
!procedure $LineSets($num)
!while $num > 0
alice -> bob <<a>> : msg
<style>
arrow {
LineThickness 3
Linecolor red
}
</style>
alice ->x? : red
<style>
arrow {
LineThickness 1
Linecolor black
}
</style>
!$num = $num - 1
!endwhile
!endprocedure
$LineSets(300)
@enduml
Note that the style workaround (red) isn't what is failing, but this set/reset cycle ends up breaking the <<a>> (green) stereotype. Oddly, in my large diagrams, other stereotypes/css styles do not seem to be affected--only the ones used for arrows. I found this out when I tried replicating the arrow stereotype with a different name, but it also fails.
Without breaking up the diagram (explained above), how can I work around this? (Will I need to modify all arrows to use this set/reset cycle?)