BATCH-2002: Initial support for complex conditional replacements