David, Eric wanted to run this past you - the if clause that I added is being hit ~10,000 times during initialization. Without the change, this.scene appears to get set to the object that implements sceneGetter, which then makes it impossible to get the actual scene later on. Once initialization is done, the sceneGetter starts working correctly, so this change fixes the problem (and doesn't appear to introduce any new problems - I don't think those 10,000 calls really actually need the scene).
@eric79, @davideaster
David, Eric wanted to run this past you - the if clause that I added is being hit ~10,000 times during initialization. Without the change, this.scene appears to get set to the object that implements sceneGetter, which then makes it impossible to get the actual scene later on. Once initialization is done, the sceneGetter starts working correctly, so this change fixes the problem (and doesn't appear to introduce any new problems - I don't think those 10,000 calls really actually need the scene).