Unexpected node type

The following error is thrown in the Unity editor 2021.2.0 (Burst 1.6.6) after each code compilation:

Unexpected node type.
UnityEditor.Compilation.CompilationPipeline:GetAssemblies (UnityEditor.Compilation.AssembliesType)

Class:

internal static class BurstReflection

This line of code

var assemblyList = CompilationPipeline.GetAssemblies(AssembliesType.Editor);

Assemblies types:

namespace UnityEditor.Compilation
{
  /// <summary>
  ///   <para>Flags for Assembly.</para>
  /// </summary>
  public enum AssembliesType
  {
    /// <summary>
    ///   <para>Selects assemblies compiled for the editor including test assemblies.</para>
    /// </summary>
    Editor,
    /// <summary>
    ///   <para>Selects assemblies compiled for the player including test assemblies.</para>
    /// </summary>
    Player,
    /// <summary>
    ///   <para>Selects assemblies compiled for the player excluding test assemblies.</para>
    /// </summary>
    PlayerWithoutTestAssemblies,
  }
}

Hi @HernandoNJ - this was also reported here - "Unexpected Node Type." error spamming console after unity upgrade - Unity Engine - Unity Discussions - and that thread has a couple of suggestions on how to fix it.