This is an alternate fix to the problem that there are no active vertices / edges after an extrude, so snap active during the subsequent g move doesn't behave as expected. This one works by having the various extrude functions add the last-created edge or vertex (according to selection mode) to the bmesh's selection history, after the extrude.
The patch D640: Fix T40993: snap active vertex/edge fallback to snap median broken by mangostaniko fixed the problem by removing the code from BM_select_history_active_get (in bmesh_marking.c) which, when there is nothing in the bmesh's selection history, used the value in bm->act_face, if that is non-NULL. It is unclear to me when/how bm->act_face is set, but it doesn't have anything to do with the extrusion that just happened. Patch D640 may indeed be the right thing, but the confusion between how active faces are represented vs active edges and vertices makes me worried that some other part of the code depends on the current behavior of BM_select_history_active_get.