I trust in you when you say that there is a big chance that it isn't a bug, but It's at very least an unexpected behavior, isn't it? I mean, it's great that an IDE like IntelliJ gives you a warning but we shouldn't rely on that to avoid a potential bug that could be hard to find.
I'm sorry if I look like a stubborn person, I just want to share my concern about the case, and maybe bring light to a potential wrong/unexpected behavior of the language I like so much. Cheers.