CDB-1306 Deletion of named maps when deleting a table. small refactor of named maps