# Multiply Define Labels when using \ifthispageodd and addmargin Environment

I receive annoying warnings about multiply defined labels when I use \ifthispageodd and addmargin in the same document. I've made the following minimal test case to demonstrate this:

\documentclass[twoside]{article}
\usepackage{scrextend}

\begin{document}
\ifthispageodd{odd}{even}
Foo
\end{document}


Starting with the second latex run, I get the following warning:

LaTeX Warning: Label 1' multiply defined.


Looking at the aux file, this warning comes as no surprise:

\relax
\new@tpo@label{1}{1}
\new@tpo@label{1}{1}


Since it is only a warning, I could choose to ignore it but I'm wondering what's at fault here. It seems that the addmargin environment is the perpetrator, because when I remove it, the warning vanishes and if I add another one, I get two warnings (and three \new@tpo@label lines in the aux file).

But then again, when I remove the \ifthispageodd line, the addmargin environment stops emitting any \new@tpo@label lines into the aux file.

Am I using these commands wrong or is this a bug in KOMA/scrextend?

After reporting this, the KOMA-Script author fixed the bug. Since KOMA-Script prerelease 3.23.2605 the aux file of your example has only one \new@tpo@label{1}{1}`. The warning about multiply defined labels does not longer occur.