private static EnvironmentState state() {
    WeakReference<EnvironmentState> reference = Preconditions.checkNotNull(currentState.get(),
        "Static environment should be initialized");
    return Preconditions.checkNotNull(reference.get(),
        "State should still be strongly referenced elsewhere");
  }
Next iteration of the same flawed design in hopes to untangle it at least a bit.
generator/src/org/immutables/generator/EnvironmentState.java