This article does not apply to nursing homes, projects meeting the definition of subsidized elderly housing or congregate elderly housing, nor to the rehabilitation of any building or structure wholly or substantially destroyed or damaged by fire or other casualty; provided, however, that no rehabilitation or repair shall increase the number of dwelling units on the lot as existed prior to the damage or destruction thereof, except in conformance with this article.