Fix UnboundLocalError on container PUT

Fixes bug-1243973

Change-Id: If165fdcccb5d4712570b1cdabcc89e618f539849
Merge "Fix UnboundLocalError on container PUT"