Here is a minimal example that showcases my problem:
\documentclass{article}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{cleveref}
\newtheorem{thm}{Theorem}
\newtheorem{lem}[thm]{Lemma}
\begin{document}
\begin{lem}
Lemma
\end{lem}
\end{document}
The warning I get is the following:
[1pdfTeX warning (ext4): destination with the same identifier (name{thm.1}) has been
already used, duplicate ignored
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox
\fi \fi
l.16 \end{document}
{<install dir>/MiKTeX/2.9/pdftex/config/pdftex.map}]
I know that it is just a warning and that, my document will still work perfectly fine with regards to cross-referencing and hyperlinking, but I would still like to know why I am getting this warning and if anything can be done to fix it without removing functionality of the included packages.
Bonus question: Whats going on behind the scenes when this warning (or any generic 'destination with the same identifier (name{XXX.YYY}) has been already used, duplicate ignored') is produced, as this is not limited to theorem environments.
From log file:
Package: amsthm 2004/08/06 v2.20
Package: hyperref 2011/04/17 v6.82g Hypertext links for LaTeX
Package: cleveref.sty 2011/03/22 v0.17.9 Intelligent cross-referencing
Package cleveref Info: `hyperref' support loaded on input line 2157.
Package cleveref Info: `amsthm' support loaded on input line 2300.