Looks like this has never been fixed, I was checking my rooms after a long inactivity period and I can still see it happen.
Here is i posted on slack last night, with my findings
I have a room (W61S45) with disabled structures (extensions). That room reports energyAvailable < energyCapacitAvailable (1750<1800). BUT Game.rooms.W61S45.find(FIND_STRUCTURES, {filter: { structureType: STRUCTURE_EXTENSION }}).filter(s=>s.energy < s.energyCapacity && s.isActive()) reports no extension.
looks like the extensions counted for energyAvailable are not the active ones, anyone faced this already ? (notable to say that the displayed status of the extensions is off too, extension at 39,14 is shown active , but isActive returns false, meanwhile the one at 43,14 is the opposite [active but showed inactive])
This should be fixed so that inactive status of structures is consistent across the various APIs ... Due to the highly inefficient way isActive() is implemented, you can't expect players to have to call it every time (especially as the implementation lets me think the order may not be consistent over time either).
As my code will only spawn creeps when energyAvailable == energyCapacityAvailable the only way out I found is to refill all extensions, including inactive ones which is a shame