I would like to define a environment inside another environment, but I need to make sure the new environment is unique, so there can only be of them. 
The `unique` environment should also be able to be any point of the outlaying environment. 
So the code would be something like: 

```
\begin{myenv}
    \begin{env} ... \end{env}
    \begin{env} ... \end{env}
    \begin{unique-env} 
       there can be no other environments of this type in myenv
    \end{unique-env}
    \begin{env} ... \end{env}
\end{myenv}

```

I have found out how to check that the `unique` environment exists inside `myenv`, but not how I can make sure it is the only one of this kind. 

I will try to clarify a bit. I need this to be legal: 

```
\begin{some_env} 
  \begin{unique-env} 
    Something 
  \end{unique-env} 
\end{some_env} 

```

And this to be illegal: 

```
\begin{some_env} 
  \begin{unique-env} 
    Something 
  \end{unique-env} 
  \begin{unique-env} 
    Something 
  \end{unique-env} 
\end{some_env}

```

Where the some\_env is also something I have defined. 

What I need to be unique doesn't need to be a environment, it could also be a command

```
\begin{some_env} 
  \uniquesCommand{Something}
\end{some_env} 

```