Shouldn't all `export_loc` calls be moved under the `#ifdef WITH_AD3`?