Ensure taht container is set before everything. Fixes #2394.
Merge pull request #2429 from matham/drop

Ensure that container is set before everything for dropdown.