update config if to conform to revised requirements #4211.
Fix coverity-found memory leak.
Add test for corrrect/incorrect conditionals
===VersionHistory:Pending===