Fix bracket-counting algorithm and improve error messages

The bracket-counting algorithm should no longer count holds and bookings
separately when they do not overlap.