Properly handle style with dot in its name and without a parent style.