Can't figure out why a read-only transaction rolls back