Throw InvalidArgumentException on invalid platform packages in config.

It's a user provided configuration value that's wrong so
it makes more sense.