fix #19490: Slurs not visible when staff above is hidden

only invisible voices should be ignored on layout slur