The cause of this "effect" is that I believe you are drawing the outline of a rounded rectangle, one rectangle inside the other. Is that correct? If so, what you are seeing is simply how Allegro I presume is handling round corners, specifically, it does not draw a thick pixelated line and leaves some pixels "missing" in the corners. When you draw multiple repetitions like you just have, the missinh pixels become more prominent than they would be if you only drew one outline (which is what I presume the function was intended for) and create the missing lines effect.
To put it in visual form:
This is what it's doing:

This is the behavior you are relying on / expecting:

If you stack many iterations of the former round corner you will/might get (a) missing line(s).