Lookup metadata bean from context instead of injecting

That way, if there is one, it will always be the right one
(otherwise you might be processing teh parent context with
metadata from the child).

Fixes gh-1982