Fixed issue #2546 - Lines appear behind rectangles