Optimised stellarators and other magnetic-confinement devices having the property that the average magnetic curvature is favourable for all particle orbits are called maximum-$J$ devices, and have recently been shown to be immune to trapped-particle instabilities driven by the density gradient. Gyrokinetic simulations reveal, however, that another instability can arise, which is also associated with particle trapping but causes less transport than typical trapped-electron modes. The nature of this instability is clarified here. It is shown to be similar to the ubiquitous mode in tokamaks, and is driven by ion free energy but requires trapped electrons to exist.