SI-8333 can't use modifiers if class is in a block

Was caused by the ordering of parser cases. Need to check for definition
first due to the fact that modifiers unquote looks like identifier from
parser point of view.
Merge pull request #3596 from densh/si/8333

SI-8333 can't use modifiers if class is in a block