STS-3431: minor performance improvement by avoiding duplicate calls
avoid duplicate entries in the classpath element list