As you're discussing raising flaps, you appear to be describing an engine problem on takeoff. Your first priority is always to fly the airplane. Protecting the engine is important, but not as important as flying and protecting the airplane.
If the engine has run to an overtemp condition during a stalled state (compressor stall), you're not going to be leaving it in an overtemperature condition for one or two minutes to see if it matches the description. However, you're going to fly the airplane first, which will include getting it cleaned up and flying your departure profile, before you tackle the engine problem.