The classification must follow the sense actually intended in context, rather than every meaning a word might carry. Najm can refer to a celestial star, but it may also denote a plant that grows without a stem.
The first sense fits the sun and moon; the second fits trees and vegetation. Context and syntax determine which congruity is real in a particular passage.
It would therefore be a mistake either to import every possible lexical sense into one utterance or to force a familiar sense when the actual context points elsewhere.