public void generateMaps() throws MaltChainedException {
        for (String groupname : optionGroups.keySet()) {
        	OptionGroup og = optionGroups.get(groupname);
        	Collection<Option> options = og.getOptionList();
        	
        	for (Option option : options) {
        		if (ambiguous.contains(option.getName())) {
        			option.setAmbiguous(true);
        			ambiguousOptionMap.put(option.getGroup().getName()+"-"+option.getName(), option);
        		} else {
	        		if (!unambiguousOptionMap.containsKey(option.getName())) {
	        			unambiguousOptionMap.put(option.getName(), option);
	        		} else {
	        			Option ambig = unambiguousOptionMap.get(option.getName());
	        			unambiguousOptionMap.remove(ambig);
	        			ambig.setAmbiguous(true);
	        			option.setAmbiguous(true);
	        			ambiguous.add(option.getName());
	        			ambiguousOptionMap.put(ambig.getGroup().getName()+"-"+ambig.getName(), ambig);
	        			ambiguousOptionMap.put(option.getGroup().getName()+"-"+option.getName(), option);
	        		}
        		}
    			if (option.getFlag() != null) {
    				Option co = flagOptionMap.get(option.getFlag());
    				if (co != null) {
    					flagOptionMap.remove(co);
    					co.setFlag(null);
    					option.setFlag(null);
    					if (SystemLogger.logger().isDebugEnabled()) {
    						SystemLogger.logger().debug("Ambiguous use of an option flag -> the option flag is removed for all ambiguous options\n");
    					}
    				} else {
    					flagOptionMap.put(option.getFlag(), option);
    				}
    			}
        	}
        }
	}