throw Bad map number error for DEBUG build only.