private static void complete(Symbol sym) {
        while (true) {
            try {
                sym.complete();
                return;
            } catch (CompletionFailure e) {
                // Should never see two in a row, but loop just to be sure.
            }
        }
    }