This has been reported previously and we are aware of the issue. It's an issue with one of the Way of Life events. The event, as you mentioned, accidentally gives you the modifier instead of your prisoner because of a script error. But it should be fixed in a future patch. No ETA on when that will be though.