Modifed the locking behavior of setFrameworkStartLevel() to acquire all bundle locks in advance or fail and try again from scratch to avoid incremental locking issues.