Library fixes... really, really.

@bug W-2251074@

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