Feature #3167, #3169: Fix replace_template for Zone