`package-buffer-info' looks for an "filename.el ends here" comment line, where "filename.el" matches that provided on the first line of the file. However, it does not set `case-fold-search' to nil explicitly, and so will happily allow "FiLeNaMe.EL" in the trailing line. I rely on this function in package-lint to detect certain issues with packaging, and noticed this failure there. I can work around it by unsetting `case-fold-search', but this seems the wrong fix. A simple patch is attached.