You can do forward-over-reverse (no finite differences required) as described in this thread: Nested AD with Lux etc