Fixes #686
Added Sort::hasAttribute().