Repository: flutter
Issue: Failed assertion: line 1773 pos 12: '_elements.contains(element)': is not true.
Labels: framework,a: error message,P2,team-framework,triaged-framework

Hi,

I was just playing a bit around to test the new structured errors.
So I added a `SingleChildScrollView`around the column of the default counter app and placed a Expanded around the Column which lead to an exception. I removed the Expanded again and saved and got this error here.


```

════════ Exception caught by widgets library ═══════════════════════════════════
The following assertion was thrown building Listener:
'package:flutter/src/widgets/framework.dart': Failed assertion: line 1773 pos 12: '_elements.contains(element)': is not true.


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

User-created ancestor of the error-causing widget was
    SingleChildScrollView 
lib\main.dart:70
When the exception was thrown, this was the stack
#2      _InactiveElements.remove 
package:flutter/…/widgets/framework.dart:1773
#3      Element._retakeInactiveElement 
package:flutter/…/widgets/framework.dart:3059
#4      Element.inflateWidget 
package:flutter/…/widgets/framework.dart:3082
#5      Element.updateChild 
package:flutter/…/widgets/framework.dart:2897
#6      SingleChildRenderObjectElement.mount 
package:flutter/…/widgets/framework.dart:5129
```

This is the code while the error happens:


```
    return Scaffold(
      appBar: AppBar(

        title: Text(widget.title),
      ),
      body: Center(

        child: SingleChildScrollView(
                  child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Text( 
                'You have pushed the button this many times:',
              ),
              Text(
                '$_counter',
                style: Theme.of(context).textTheme.display1,
              ),
            ],
          ),
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), 
    );
  }
}
```

Removing the `SingleChildScrollView` and adding it again clears the exception.


![image](https://user-images.githubusercontent.com/16635729/64714288-ac3c0480-d4be-11e9-9d4b-aae3687c0019.png)


I use VS code with;

[√] Flutter (Channel master, v1.10.1-pre.41, on Microsoft Windows [Version 10.0.18362.295], locale de-DE)
    • Flutter version 1.10.1-pre.41 at C:\Entwicklung\flutter
    • Framework revision 5a3a46ada2 (4 days ago), 2019-09-07 18:37:41 -0400
    • Engine revision c9ea4dba8d
    • Dart version 2.5.0 (build 2.5.0-dev.4.0 ec7ec4ecf7)

 
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\escam\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] IntelliJ IDEA Community Edition (version 2018.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.5
    • Flutter plugin version 29.1.3
    • Dart plugin version 182.4892.25

[√] VS Code, 64-bit edition (version 1.38.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.4.1

[√] Connected device (1 available)
    • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 7.1.1 (API 25) (emulator)