Merge branch 'tg/refs-allowed-flags'