If there was bad faith, not only on the part of the person who built, planted or sowed on the land of another, but also on the part of the owner of such land, the rights of one and the other shall be the same as though both had acted in good faith.
It is understood that there is bad faith on the part of the landowner whenever the act was done with his knowledge and without opposition on his part. (364a)