I'm lucky that my publisher has a sense of humor.
Somewhere in the revisions round for the first proof copy (which, like anything else ordered from abroad--abroad meaning anywhere, Curaçao being an island--took forever to get here), the publisher asks,
Oh, hey, your MC quotes a line of poetry in the second chapter. Shouldn't that be credited in the copyright page?
Yes. YES. How did that slip through the cracks? It's a fragment from T.S. Eliot. T.S. Eliot. Of course it needs to be credited. Easily fixed; a quick look inside my favorite Eliot volume, an email to the publisher, and phewalldone.
What about the lines of this one song the guy sings at the end? Who should we credit those to?
What am I, an idiot? How can I possibly forget about freaking attributions? First for T.S. Eliot, and now for one of Mexico's most popular mariachi singers... Seriously. Yes, please include a credit to Mr. Pepe Aguilar.
Just like that? Pepe Aguilar?
No, I guess--wait, let me check how exactly the dude's name is listed in the song's copyright info. And, also, whether the song is, in fact, his. It's a popular song. Many artists have recorded it.
First, there is no copyright info. Title of the song: check. Title of the album: check. Performing artist: check. Songwriter: nothing. Eventually, I found a half-assed showbiz gossip article about Mr. Aguilar being upset about some bachata singer in the Dominican Republic recording this song of his--which is not really his (or he wouldn't have been crying No Fair to a magazine, he'd have been in court); turns out this other dude by the name of Fato wrote it for Mr. Aguilar.
Eventually I got his real name: Enrique Guzmán Yañez. (Never heard of him.) But I still couldn't find actual copyright details for the song. Fine, Mr. Fato wrote it--but who owns the copyright? Fato? Mr. Aguilar (unlikely, given the Dominican issue)? The record label? Sources were not just unclear but contradictory.
I found the latest version of the Mexican Intellectual Property law online, downloaded it, and read it. The whole thing. (My six years in the tax and wealth-planning world finally put to literary use.) And I was able to establish for the publisher (and for me!) that the portion of the song quoted in the book would not infringe copyright, or require authorization, or incur remuneration for the copyright holder, based on sections so-and-so of articles so-and-so.* (And I filed away a copy of this law, with relevant sections highlighted, just in case.)
My point here is that inexperience is a serious handicap. Even with my years behind a desk of law and (semi) order, if I'd been self-publishing this book I'd have ended up with, best-case, a problem. I simply didn't think. I've no doubt that self-publishing is the best way to go for many, many people, but I'm so, so glad I had a publisher to cross my t's and dot my i's.
*In case you ever want to quote stuff registered in Mexico: Mexican law pretty much follows the Fair Use statute of common law. Meaning that as long as the portion you're using does not constitute a substantial or simulative reproduction, and as long as you're not seeking direct financial gain from using it, you're good to go. So, for instance, if I'd quoted the whole song, or at least half of it, and/or if I'd used it to promote sales, we would've needed authorization and/or been liable for remuneration to the copyright owner.