I just found a library that had up to 7 entries in the special_holidays table for a given combination of branchcode and year, month, day. This doesn't make sense, it's not fixable in the UI, and it can cause performance issues, because all values will be checked.
*** This bug has been marked as a duplicate of bug 18874 ***