Merge pull request #966 from zeha/coverity

Some fixes for Coverity
Fix for compile error introduced by 63851c6

"update LUABackend::setDomainMetadata signature" - while my updating of
the signature is great, there apparently was no compile test prior to
submitting.