Beamer: Short Section Titles in the Headline

I have a beamer template for a presentation. In this template, the headline shows the section name and the subsection to which the current slide belongs to. However, even if I have defined a short title as in

\section[Short title]{The very long title that surely is way too long}

the headline always shows the long title.

Here is the code from the style file which shows the section name

\pgftext[at=\pgfpoint{\beamer@headline@lmargin}{-0.55\beamer@headline@height},left,center]{
\begin{beamercolorbox}[dp=0.5ex]{section in head/foot}
\shadowtextline{\insertsection}
\end{beamercolorbox}
}

So my question: Is there any other command for \insertsection in order to show the short title?

The outer theme should use \insertsectionhead instead of \insertsection:

1
2
3
4
5
6
7
8
9
10
11
12
13
\documentclass{beamer}

\begin{document}

\section[Short section title]{Long section title}

\begin{frame}
Long title: \insertsection

Short title: \insertsectionhead
\end{frame}

\end{document}