fix #41036: no beam over gap

check for gap before allowing "auto" beam to connect notes