I would like to redefine Beamer's frame environment to provide different templates as part of a theme. However, I'm having some trouble accessing Beamer's variable from inside that code.
\documentclass{beamer}
\usepackage{tikz}
\title{Example}
\let\oldframe\frame
\let\endoldframe\endframe
\renewenvironment{frame}
{\oldframe%
\begin{tikzpicture}[remember picture,overlay]%
{\node[draw,anchor=west,text width=.6\textwidth] at (1,0) {\insertframetitle};}%
\end{tikzpicture}}
{\endoldframe}
\begin{document}
\begin{frame}
\frametitle{My Title}
\end{frame}
\end{document}
This produces no text inside of the text box.

However, if I replace "\insertframetitle" with some fixed text, it works.

Why is the variable not available in my environment?