minor refactoring in tag_expressions.rb