otec: refactoring plus a (currently ignored) test which I think simulates a potential problem