age-circs.sql: move circ exception testing to separate function