Hello @ann-sophie and welcome to the SonarSource community!
Thanks for taking the time to report this issue, I managed to reproduce it.
Note that it seems to me that this is only a temporary FP: I managed to reproduce it when I just pasted the code, if I build the project, the issue disappears.
In any way, I think we should do something to improve the situation, as it may happen in other situations. Ticket created: SONARJAVA-4109.