Do not generated bad code when named chunks are merged or empty

fixed webpack/webpack-dev-server#30