Attempt to better wait for tree expansion

Signed-off-by: Michal Čihař <michal@cihar.com>