Added testcase for #7039 to make sure PatternOptions::setObjectKey works as expected