fix ticket #3109: Clone library