Flames show in viewport but not in render
I found the solution, turns out my particle emitter was disabled in render, which disabled rendering fire. 

This is weird because smoke is still rendered and volume passes are all black, and disabling the emitter in viewport does not affect anything.