Bug fix - detaching must happen after existing devices are handled.

This ensures the init script is blocked until most drivers are loaeded.