Fix some state-related timing issues with provisioning EC2 instances.