Detects filetype based on a shebang line in the file or the filename extension.
Which was correct until someone decided to add the html/xml stuff and didn't update it.
Not a good presumption. I did not find this "filetype guarantee" in the manual.
All projects as old (the oldest release tag in git is 2005 when the project was moved from CVS to SVN but that clearly wasn't the start of the project) as Geany have some undocumented presumptions of how the project works and how things are intended to work. One of the skills in contributing to open source is to listen and learn those unwritten presumptions.
Unconditionally changing the filetype (if detected) from a reloaded file means a user specified filetype will be overridden, and people do reload for all sorts of things, there is even an automatic reload option used by some for dynamic things like logfiles or program outputs. An accidental filetype detection on reload would keep changing the user set filetype for those.
If there is an argument for re-running the filetype detection on an open file then a menu item (which can have a keybinding so you can avoid that horrible menu thing :-) should be added to do that. Do not to connect two separate actions and force users to accept both when they only want one.