When using the old US Navy tables, all dives are deco dives (or, at least, this is what was taught me back in 1975).
Let's make the same example with a shorter bottom time, 25 min at 30m, which was within NDL with those tables.
If during ascent you take an excess time up to 5 min, you will follow the table for 30 min, 30m, doing a deco stop of just 3min at 3m.
II your ascent is even slower, so the extra ascent time is, say, 7 minutes, then you fall back to a bottom time of 40 min, which gives you a deco time of 15 min at 3m.
So the fact that the planned dive was within NDL, or outside it, does not make any difference to the logic.
Furthermore, as originally the US Navy tables were coinceived for an ascent rate of 18 m/min, instead of 10, they were already considered "not safe enough" at the time for sport divers.
So the method recommended was very simple: instead of computing the dive time from the beginning of descent to the beginning of ascent, we were taught to play it safe, counting the dive time from the beginning of the dive to the moment of reaching the deepest deco stop (9m for recreational diving).
This automatically acvounts fot any excess time during ascent.
At that point you look at your timer, and that is the total dive time. You look at the depth meter, and the red arrow shows you the max depth reached.
With these two numbers you look at dive tables, choosing the first depth equal or just larger than your max depth and then the dive time equal or slightly larger than the total dive time.
In most cases this would create enough excess deco stops for being safe, despite the US Navy tables, if followed strictly, where not 100% DCS safe.
Of course computers made this approach entirely obsolete...