We actually asked Marijn to tweak Tern to provide this information, but didn't get what we needed.  This way works, although it's a hack.