Fix bug of declaring regularization loss multiple times when reusing PartitionedVariables in tf layers