Ok - happy with this.  Slightly worried about the performance hit, but sounds unavoidable.