Actually, thanks! Your reply combined with full night's sleep made me realize I've been looking at completely wrong place. I got so fixated on Cowgirl Anal positions being expansion material that I forgot the original code. And it's now fixed. It's not pretty, but it works and even without extra lines. I just turned this
if lastaction.scene.code in sceneref.analcategories && (lastaction.takers.has(self) || lastaction.scene.code == 'doubledildoass'):
into this
if lastaction.scene.code in sceneref.analcategories && (lastaction.takers.has(self) || lastaction.scene.code == 'doubledildoass' || lastaction.scene.code == 'cowgirlanal' || lastaction.scene.code == 'revcowgirlanal'):
It's a good reminder that taking a break beats banging your head against the wall ten times out of ten. Which I'm sure to forget. Again.
EDIT: It's still not flawless though, as one might guess. If you have your willy in someone's bum in Cowgirl Anal position, you soon get a craving for having one in yours too. To each their own, I guess. It's not too bad of a workaround, but as such it doesn't really work with what I'm trying to create. I'm pretty sure the problem lies with the lastaction.takers -part but for some reason I haven't been able to come up with a givers-equivalent of it. I'm already ashamed of how simple the solution must be, but it still eludes me.