Hold global lock while updating a bundle and performing a security check and make sure we rollback the module if the security check fails. (FELIX-2802)