Fix an NPE caused by library changes.

@bug W-2309422@

@rev fabbott@
Merging origin/goliver/master-pending-library-npe into master