Where any building to which section 16 applies, or any land or wharf on which is situated any building to which section 16 applies, is subject to a lease, tenancy, licence, or agreement between the Commission and a Harbour Board or port company, as the case may be, the lease or tenancy shall be deemed to be surrendered as at the close of the appropriate date (as defined by section 16(2)), or, as the case may require, the licence or agreement shall be deemed to be cancelled as at the close of that date, and the Commission and the liquidator shall not be liable to pay any further money under the lease, tenancy, licence, or agreement, or to pay any compensation for the surrender or cancellation of it.