Node with zero shards fails to start with error "Node is started with node.data=false, but has shard data"

Ran into the same situation again on the next node that I no longer wanted to use as a data node. The node has zero shards allocated.

sh-4.2# bin/elasticsearch-node repurpose -v
------------------------------------------------------------------------

    WARNING: Elasticsearch MUST be stopped before running this tool.

Obtaining lock for node
Collecting shard data paths
Paths to clean up:
  /usr/share/elasticsearch/data/nodes/0/indices/myrWs3pnSmuZwTplN3XKdw/3
Indices affected:
  important_index_in_use
Found 1 shards in 1 indices to clean up
Node is being re-purposed as master and no-data. Clean-up of shard data will be performed.
Do you want to proceed?
Confirm [y/N]

(Index is not named "important_index_in_use", but I changed it here in the post.)

This index is in use. Why am I seeing shard data here even though the node has zero allocated shards?