When user specifies -l option and the target file can't be opened (ie. nmdm module isn't loaded and /dev/nmdm* is specified) bhyve tries to apply capabilities to not open file. Enclose that part in an if statement and only run it on correctly opened descriptor and in case of error provide meaningful message about the problem.
After applying this patch, specifying non existing file (or not loading nmdm) to -l option should effect in
Unable to initialize backend '/dev/asdf' for LPC device COM1
Unable to apply rights for sandbox