Index: src/wp-includes/js/media/views/frame/post.js
===================================================================
--- src/wp-includes/js/media/views/frame/post.js	(revision 40049)
+++ src/wp-includes/js/media/views/frame/post.js	(working copy)
@@ -570,7 +570,7 @@
 					style:    'primary',
 					text:     editing ? l10n.updateGallery : l10n.insertGallery,
 					priority: 80,
-					requires: { library: true },
+					requires: { library: true, uploadingComplete: true },
 
 					/**
 					 * @fires wp.media.controller.State#update
Index: src/wp-includes/js/media/views/toolbar.js
===================================================================
--- src/wp-includes/js/media/views/toolbar.js	(revision 40049)
+++ src/wp-includes/js/media/views/toolbar.js	(working copy)
@@ -138,7 +138,8 @@
 			}
 
 			var requires = button.options.requires,
-				disabled = false;
+				disabled = false,
+				modelsUploading = ! _.isEmpty( library.findWhere(  { 'uploading': true } ) );
 
 			// Prevent insertion of attachments if any of them are still uploading
 			disabled = _.some( selection.models, function( attachment ) {
@@ -145,6 +146,10 @@
 				return attachment.get('uploading') === true;
 			});
 
+			if ( requires.uploadingComplete && modelsUploading ) {
+				disabled = true;
+			}
+
 			if ( requires.selection && selection && ! selection.length ) {
 				disabled = true;
 			} else if ( requires.library && library && ! library.length ) {
Index: src/wp-includes/js/media-views.js
===================================================================
--- src/wp-includes/js/media-views.js	(revision 40049)
+++ src/wp-includes/js/media-views.js	(working copy)
@@ -5684,7 +5684,7 @@
 					style:    'primary',
 					text:     editing ? l10n.updateGallery : l10n.insertGallery,
 					priority: 80,
-					requires: { library: true },
+					requires: { library: true, uploadingComplete: true },
 
 					/**
 					 * @fires wp.media.controller.State#update
@@ -5691,10 +5691,11 @@
 					 */
 					click: function() {
 						var controller = this.controller,
-							state = controller.state();
+							state = controller.state(),
+							library = state.get('library');
 
 						controller.close();
-						state.trigger( 'update', state.get('library') );
+						state.trigger( 'update', library );
 
 						// Restore and reset the default state.
 						controller.setState( controller.options.state );
@@ -7721,7 +7722,8 @@
 			}
 
 			var requires = button.options.requires,
-				disabled = false;
+				disabled = false,
+				modelsUploading = ! _.isEmpty( library.findWhere(  { 'uploading': true } ) );
 
 			// Prevent insertion of attachments if any of them are still uploading
 			disabled = _.some( selection.models, function( attachment ) {
@@ -7728,6 +7730,10 @@
 				return attachment.get('uploading') === true;
 			});
 
+			if ( requires.uploadingComplete && modelsUploading ) {
+				disabled = true;
+			}
+
 			if ( requires.selection && selection && ! selection.length ) {
 				disabled = true;
 			} else if ( requires.library && library && ! library.length ) {
