I see the prohibition for OCPD in the vicinity of easily ignitable materials in the 1962 NEC. {240-16(C)} The wording regarding clothes closets was added in the 1981 NEC.
I have that situation in my own home. The Code in 1950's said that OCPD shall not be located in the vicinity of easily ignitable materials. Or something close. When I upgrade the service I will move the panel to the laundry room.