Gallery set to “Media file”, showing as attachment page
I have the Same issue, its a bug in 3.5.1 You have to select “Attachement page” from the dropdown menu, then go back to “Media file”.. This will add gallery link=”file” ids= to your script (which is missing)