A plausible reading of verse 18 would be that Gideon was not one of those who fled with Noah before the Lamanite advance. Indeed, the character of Gideon as we glimpse it would have been antithetical to such a cowardly flight. The scenario that appears to best fit the description is that Gideon and those loyal to him would have remained to defend the city, and it was those loyal to Noah, and those who panicked who fled to the wilderness.
The flight of an entire city would be a remarkably easy target, and while even this group was destined to be caught, it is most probable that the flight was of Noah's loyalists and their families in the immediate vicinity of the palace. No others save those who saw the flight and joined in panic would have had the time to assemble themselves, even for flight.