Ignore multiple references of components

Only add each component once to avoid duplicate code.