using ref inside chapter or section in lualatex

As stated in the original title of the thread, I would like to use a reference number inside a section name.

Actually, it is to refer using the structure like

\section{Data related to Figure~\ref{fig:XY}}


The MWE for what I want is:

\documentclass[11pt,twoside,a4paper]{book}
\usepackage{hyperref}
\begin{document}
\chapter{First}\label{c:First}
\chapter{I want to use ref~\ref{c:First} here }\label{c:Second}
\section{Dummy section}
\newpage
\section{Dummy section in new page}
\end{document}


I tried to run such file into LuaLaTeX several times, since I am using it for my actual project. The related line in log output is

LaTeX Warning: Reference C:FIRST' on page 4 undefined on input line 16.


The PDF file is generated, but the chapter name in page 4 becomes

CHAPTER 2. I WANT TO USE REF ?? HERE


I tried to find a possible duplicate, but I didn't find. Thanks in advance.

-

The problem is that \MakeUppercase, that is used for the page headers, also converts the argument of \ref. A protected macro could be defined to prevent this:
\DeclareRobustCommand*{\refcfirst}{\ref*{c:First}}
`