Tried this, confirmed this bug. Attachment.php does not display. Deleted it, now it works again.
The gallery function is cool, but it really doesn’t make sense for anyone to have the thumbnail link to a lame “attachment” page and then the full size image is bare not inside the template. And no options in wp-admin for configuring gallery/attachment/image display…
References for improving this situation:
* https://www.worch.com/2008/08/31/page-gallery-improvements/
* https://www.ads-software.com/support/topic/200681
* https://mfields.org/2008/04/26/adding-text-links-to-wordpress-gallery/