If the valuer knows that the improvements are not permitted than the valuation could come in at land value less cost to remove the improvements.
If the valuer does not know about this and values it as if the dwelling is permitted then the lender may still get suspicious based on the contract...