Add functionality + test for invalidation inside a running transaction