fix issue #1909

Update the examples list when a library is added or removed