[BUGFIX] Harden fallback class map generation