Indeed, that would make the checks simpler. However, `TestClass` does quite a few things in its constructor which are not necessary whatsoever to fix this bug. Are you sure you want to have `getDeclaringClass()` return a `TestClass`?