Fixed a border drawing bug in the bordered layer.