I seem to remember that I also destroyed the escape pod and it was not counted as a kill.
Ah, that's GalCop for you. So inconsistent!
Edit: Actually, after reviewing my code, I think you experience may have highlighted a small issue. When I first put the mission together, I used the ship role to determine if the ship was a pirate. What I then noticed when I was testing is that, if you have any OXP's that add "pirate" ships to the system, but don't necessarily give them a standard, core-system pirate role, then the kill wasn't being attached to the mission. Which might be OK if it's just an asteroid you've been chasing, but a tad more annoying if it's some hot-shot OXP pirate you've spent the last 20 minutes battling.
My solution was to move away from using the role, and instead checking the name of the AI in use. However, as soon as a pilot ejects their ship gets a "null AI" set, which also means a kill won't get attached to the mission.
I also can't assume a bounty means a pirate, as there are lots of ways standard traders could get bounties.
Hmm. Thinking caps on for this one.
I might have to use a combination of logic for this case: start with the standard role based check, then progress to the AI check. It probably won't rule out all instances, but there'd be far less of them. Thanks for the reports.