Consider refactoring this lambda to a generic method and reuse it for the AfterMap calls below too.