Fix concurrency bug when adding new annotations + add test that proves it is fixed.