Ignore trailing slashes when specifying work library
Fix a bug when elaboration for-generate