https://github.com/unicorn-engine/unicorn/issues/334 The code is a bit different than in the issue, but it should demonstrate the main problem just fine.