Add pass-by reference to beforeEnqueue hooks.