Temporarily fix EmptyComponents

This a workaround for the problem described in #2770. It should be
temporary because this is really just working around the real problem.
Merge pull request #2771 from zpao/temp-fix-empty-component

Temporarily fix EmptyComponents