Added flag coding logic for SST flags