Bringing in Matchbox Twenty’s Rob Thomas to sing the jingle for iZombie’s in-series drink Super Max began as a writers’ joke—he shares a name with the CW drama’s executive producer, Rob Thomas, and the two are often mistaken for each other.

PHOTOS: 8 Episodes That Surprised Us With Musical Numbers

But the gag felt right, so Thomas reached out to his namesake via Twitter's private messaging, and asked if he'd sing the song and then appear in the Season 2 finale. The crooner (above, second from left, in a behind-the-scenes shot with Robert Buckley, Rose McIver and Malcolm Goodwin)—who is a fan of the series—agreed, and plays himself at a prison-themed Super Max party in the April 12 season finale.

(As to why Major would be in police getup in the season finale, Buckley was coy: "I think we've seen Major in a lot of denim and J. Crew shirts—he may just want to switch it up," he jokes. "It would make sense if you're having a world famous musician at the party; you dress up for him." His alternate, Bodyguard-related joke: "I am his Kevin Costner.")

Of course, things take a turn at the Max Rager party. “You don’t want everyone locked up when there are zombies around,” iZombie’s Thomas teases.

We spoke with the writer about having his name twin on iZombie, what didn't make the cut this season and more.

Both you and musician Rob Thomas have seemed to handle the name mix-ups very well. How well do you actually know each other, and what’s been the craziest mistake people have made so far?

He’s been incredibly kind over the years; we just have so much overlap. Our Twitter feeds would be prime examples. I’m sure my Twitter feed is jammed with much more of his stuff than his with mine. We’ve known each other through social media, and we would pass along things that have gotten to the wrong person, which has happened more often than you would think.

The craziest story of the last year: I got an invitation through a publicist that I used to work with, to go out to lobby on behalf of arts in education [at the White House Correspondent’s Dinner]. I was thrilled to do it...and I had accepted, and everything happened via email. And then two days before we were set to leave, I saw a press release that said Rob Thomas of Matchbox 20 was going out to lobby on behalf of arts in education. And I realized, “Oh my God, they invited the wrong Rob Thomas to this.” They were kind enough to let me tag along, nonetheless. Most of the time, it’s not that bad in terms of mistaken identity. But there have been many funny situations.

What’s been the craziest thing that you’ve heard people say about him?

Well, he’s the recognizable person. I don’t think it affects him quite the same way. I know he forwards me emails and Twitter stuff that comes his way. Or he makes funny comments and says, “I think you have the wrong Rob Thomas.” I tend to show up at hotels or airline counters, and people deflate when they find out I’m not him. They see my name on the reservation log at a nice hotel, they’re very excited, and then I check in, and it’s like, “Aww.” But I’ve gotten very used to it. It’s OK.

When it came time to have him on the show, did you always want him to play himself? Or did you contemplate having him play a totally different character?

It was nothing we talked about. A couple of things happened: we were writing an episode and...we were going to have a commercial. We thought it would be cool if there was a Super Max jingle. One of the writers in the room was like, “Who could we get? I know, how about Rob Thomas?” And it just struck us as so funny. And I knew I could reach out to him because we do follow each other on Twitter, so I could just direct message him. And he’s said nice things about the show, so I kind of thought, he’s watching the show. I just sent him a message saying, “Is there any chance you’d be willing to do this? And if you’d be willing to do it, we’d love you to actually appear in the finale and play a song.” And he was great. I think he answered within an hour, an hour and a half. He was coming back from a tour in Australia, so the only thing was if we could make the dates work. Luckily, we were able to.

What can you say about the finale?

Vaughn Du Clark, played by Steven Weber, is having a Super Max launch party. They’re doing it in the Max Rager parking garage, and they have, inside of it, created a Super Max prison. It’s a theme party, built around a prison theme, which ends up working against them: the thing you don’t want is everyone locked up when there are zombies around.

And what will the core group of characters be dealing with?

There’s a lot of quality turns coming up, I don’t want to give away too much. Blaine went back to zombie form…it’s safe to say that Blaine followed New Hope the rat down that path. It’s probably a pretty safe assumption that a similar fate is in store for Major. Our characters are preparing for that eventuality, that possibility, trying to get their ducks in a row.

In other news, the new version of the cure is not without side effects. We’re going to start to see those come into the forefront with Blaine. Those side effects will probably give Major great pause in trying to figure out how he wants to deal with his impending zombiehood. The Ravi/Peyton/Blaine quasi-triangle comes a bit more to the forefront. The other thing I will promise is a huge, pull-out-all-the-stops season finale. We had a big season finale in Season 1, and this one will be even more expansive… It’s probably not as big as a Lost finale, but for iZombie, it’s all hand on deck.

RELATED: iZombie: Could Blaine's "Cure" Be Worse Than Death?

The show received an early-ish renewal before filming wrapped, but as you were shooting the finale. Did getting the go-ahead for Season 3 change anything about what you planned to put into the finale?

No. I would have been so incredibly devastated and bummed if we were not coming back. But there’s a lot of finality in the season finale. I try to build seasons that are their own big chapters…even if we had not come back—I tried to close a lot of the stories, the big dramatic conclusion of the story, and tee up stories for the next year. I suppose the stories we tee up for next season would have never gotten to play out. But it would have given the audience a level of satisfaction that Season 3 of Veronica Mars did not, when I was lobbying very hard to not tie up the season in a tidy bow.

Was there anything in this season that you weren’t able to get to that you’re hoping to play with next season?

Maybe. We did have to tighten some things up. We’re going to have more deleted scenes in this year’s DVD than last year. We did have to cram a lot of story into the final six; I think I was really hoping for the full 22 episodes and kept pacing myself as if we were doing 22. And then when I found out we were doing 19, there was a lot of story to bang through. In some ways, I think it created really fun television, because it comes fast and furious in these final six. But there were things we did have to cut out, and they will be on the DVD. And because they’re so tied into the current season, I’m not sure we’ll get to do them next year. We had shot some scenes and some storylines with Liv’s mother and brother that I had every intention of doing, and they just got squeezed out of the episode, unfortunately.

iZombie, Mondays, 9/8c, The CW