Fix bug where removal of repo removes current library