Correctly handle sending of policy when flash is used and only allocate buffer if needed.