Sometimes I stumble over absolutely classical bug reports. Glibc bug report, 'glibc doesn't work right when filesystems have 0 inodes in directories'. Opened 2010, closed 2010 WONTFIX by who you think, reopened in 2016 under a new maintainer, fixed 2022-09 for readdir() and 2024-09 for readdir64_r().
https://sourceware.org/bugzilla/show_bug.cgi?id=12165
I discovered this via this Go bug about the same issue, https://github.com/golang/go/issues/76428 (which has a 'how you can get this yourself' example due to gvfs/FUSE).