Avoid duplicate declaration errors when running multiple instances