Fixed random sorting of flags