In fact the panels are created, but static and not local. This has many side effects, f.i. your panels are not removed after leaving the function, and are not created again when you call the function anew. Because of this confusing behavior and because it does not make sense to declare engine objects in a function, we've just written in the manual that engine objects must not be local.