Using \begin{collect*} in a new \newenviroment

I'm not terrible experienced with latex, an I'm trying to wrap up the \begin{collect*} command with some common arguments used into its own enviroment, but I'm having trouble getting the whole thing to work. The issue only shows inside a custom enviroment. A minimal example that shows this example is:

\documentclass[11pt,english]{article}

\usepackage{xparse}
\usepackage{collect}

\DeclareDocumentEnvironment{dup}{ m }
{  \begin{collect*}{#1dupcollection}{}{}{}{}
}
{
\end{collect*}
}

\begin{document}

\begin{dup}{atest}
content...
\end{dup}

\end{document}


The error I'm getting is: File ended while scanning use of \@tempa

I have tried looking for a solution but had no luck finding one. I'm sure someone here can assist.

\documentclass[11pt,english]{article}

\usepackage{collect}

\makeatletter
\newenvironment{dup}[1]{%
\definecollection{#1dupcollection}%
\@nameuse{collect*}{#1dupcollection}{}{}{}{}%
}{%
\@nameuse{endcollect*}%
}
\makeatother

\begin{document}

\begin{dup}{atest}
content...
\end{dup}

\end{document}