Adding boolean to keep track of writeCSSDefinition for each layer
A small refactoring for readability when writing cssModules