/*
 Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://cksource.com/ckfinder/license
 */

( function( window, bender ) {
	'use strict';

	var unlock = bender.defer(),
		originalRequire = window.require;

	// TODO what if require is never called?
	bender.require = function( deps, callback ) {
		originalRequire( deps, function() {
			callback.apply( null, arguments );
			unlock();
		} );
	};

} )( this, bender );

@@ -202,117 +202,8 @@
 ';%0A%0A
-%09var unlock = bender.defer(),%0A%09%09originalRequire = window.require;%0A%0A%09// TODO what if require is never called?%0A
 %09ben
@@ -251,17 +251,48 @@
 %7B%0A%09%09
-originalR
+var unlock = bender.defer();%0A%0A%09%09window.r
 equi

Move bender.defer() inside the require call.