The attached patch changes the number of timelevels of the ahmask to match the number which is used for the metric. Setting this to three unconditionally leads to problems when running with Carpet and prolongation_order_time=1 because all GFs in Carpet are expected to have the same number of timelevels: prolongation_order_time+1.
This is not the ideal solution. That would eliminate also variables ala metric_timelevels, because they directly depend on prolongation_order_time and should not have to be set (correctly) in a parameter file. This could be done automatically.
However, the attached patch for now uses metric_timelevels, in order to get AHFinderDirect working quickly.
I am asking for a review, and can apply it myself after a positive reply.