Perhaps you are being required, for terrain clearance, to maintain best angle of climb (Height vs Distance travelled) rather than best rate of climb (Height vs Time ? To do this with flap extended you must maintain max climb thrust at V2 + 10 until you can safely accelerate to commence flap retraction when clear of the specified terrain.