How to handle property within an ANT condition tasks

I would like to write something like:

def SvnUrlExists(url) {
    project.ant {
      condition(property: "urlExists", value: true, else: false) {
        svnExists(refid: 'svn.settings', target: url)
      }
      return urlExists.toBoolean()
    }
}

The problem is that urlExists is an ANT property and therefore immutable, so the first call to the function will fix the value and later calls will likely not return the expected results.

So I need a way to make this property mutable (though I don’t want to use ant contrib) or replace the ANT condition with a groovy construct.

Any ideas?