No enclosing instance of type xxx is accessible. Must qualify the allocation with an enclosing

NoSuchKey