Derivatives of DirichletBC.apply()

I want to simulate an evolution equation with time varying Dirichlet boundary conditions, but static bilinear form.

From an efficiency point of view, one could assemble the matrix A corresponding to the bilinear form prior to the start of time-stepping, and inside the time loop, only assemble the right hand side b of a(u,v)=<f,v>, applying the boundary conditions and then solve the system.

Is there any way in dolfin-adjoint that I can achieve this (apart from creating an extension of the dirichlet data and solve an problem with homogeneous BCs instead)? As far as I understood I cannot just do bc.apply(A,b) because annotation is not implemented for that method.