Yes, the location of CONFIG_SYS_NO_FLASH is important. You have to define that before you #include <config_cmd_default.h>
For example, I ported the BSP to another board that did not have parallel NOR flash, so my .h file has this:
/* Uncomment for systems with No Parallel NOR Flash */
#define CONFIG_SYS_NO_FLASH
#ifndef _CONFIG_CMD_DEFAULT_H
# include <config_cmd_default.h>
#endif