Problem: Firefox has switched to the GTK3 file chooser, and sorts all entries in a folder by name with directories in-between instead of at the top.
Aggravation: GNOME is not even installed so there is no graphical tool to configure this.
Solution: Make sure at least gsettings is installed, and call it like so:
gsettings set org.gtk.Settings.FileChooser sort-directories-first true