I had a problem adding a border to the compass as well.
I wanted a compass border that was actually larger than the compass itself, such as the ones pictured here:
When I made the border initially, it looked all wrong. The sides were stretched out really long, adding a black area inside the border under the compass. I double checked and found no errors in my xml. Through experimentation, I found that I could fix the window size by adding blank space around the border, widening the bottom border to the same thickness as the top.
I think the border layout code has some bug with borders that are thicker than the window they surround ... or something.