Fix NPE on duplicate flag names