I just read the submodule section of the O'Reilly book, and the author mentions adding a submodule (manually using git to add the cloned repo in the root of the project in his example), including the trailing slash forcing him to add the folder to the index against creating gitlink. This sounds silly, but maybe try changing directories to lib before you add to make sure that this does not happen to you because of the slash in your path to the submodule.
It can also be a feature of the add submodule, only getting the path and remote url and calling the name of the submodule from the path when writing to configs. Perhaps manually edit the gitmodules and config entries to ensure that the submodule is named without `lib / ', but the path contains it.
source share