Fix not adding libraries twice

Change-Id: If606dc4b8408f8a9ae74957248597cf015ca5a59