Fix namespace declarations in a couple of unit tests
Cache inherited annotations as a whole; improves performance