Improve CTL_BEARG_* flags support, including optional values copyout.