I tested the Gumbo offset method, but it looks like the parser doesn't take the header into account when returning offsets. I also had to add 1 to the line number. The plugin works with a blank epub2 book but not with "real books."
BTW, I used the following plugin code:
For your convenience, I've also attached the actual plugin.