Part of the code which configure metadata is moved to a different if-loop.

During the new provisioning scripts, this issue was introduced. Fixing now.

Change-Id: I669ba52b10346b44131410e9bd879bbcce690530
Closes-Bug: 1382194