Longitudinal mode competition in semiconductor lasers: Rate equations revisited