build: throw a fatal error for duplicate target declarations