Change lock/approve logic such that metadata properties are only set once, which fixes a very rare testcase failure