Since we don't have conditionally visible Layouts (only conditionally visible Elements), any Layout containing elements that might be conditionally hidden CANNOT have top/bottom borders - because those top/bottom borders will render as stray horizontal lines.
Please - conditional layouts, or hide the top/bottom layout border if there are no contained elements, or if contained elements are hidden conditionally.