Where the owner of property transfers it to another for an illegal purpose and such purpose is not carried into execution, or the transferor is not as guilty as the transferee, or the effect of permitting the transferee to retain the property might be to defeat the provisions of any law, the transferee must hold the property for the benefit of the transferor.