fix issue #479 and add spec for it. Closes #479

https://github.com/bem/bem-core/issues/479