function makeLibraryFilter(aLibrariesToTest, aExcludedLibraries, bIncludeDistLayer) {
		if ( aLibrariesToTest ) {
			return function(sLibName) {
				return aLibrariesToTest.indexOf(sLibName) >= 0;
			};
		} else if ( bIncludeDistLayer ) {
			return function(sLibName) {
				return aExcludedLibraries.indexOf(sLibName) < 0;
			};
		}
		return function(sLibName) {
			return aExcludedLibraries.indexOf(sLibName) < 0 &&
				(bIncludeDistLayer || ControlIterator.isKnownRuntimeLayerLibrary(sLibName));
		};
	}
Creates a filter function for libraries, taking the given parameters into account.

When a list of libraries is given (<code>aLibrariesToTest</code>), the returned filter
function will match exactly the given libraries (allowlist).
Alternatively, a list of libraries to exclude can be given (<code>aExcludedLibraries</code>,
blocklist) which will then not be matched by the returned filter function. In the case of
the blocklist, the filter is additionally restricted to openui5 and sapui5.runtime libraries
unless <code>bIncludeDistLayer</code> is set to true.

@param {string[]} [aLibrariesToTest] List of libraries to load
@param {string[]} [aExcludedLibraries] List of libraries to exclude
@param {boolean} [bIncludeDistLayer] whether the list of libraries should be restricted to
           known runtime-layer libraries (superset of the OpenUI5 libraries) or include any
           dist-layer libraries
@returns {function(string):boolean} A filter function for library names