Legal row 'an excuse to close library'