BUG Fixed instances of loosely defined SQL predicates not qualified by table name
Fixed duplicate SQL escaping on SiteTree::get_by_link
Merge pull request #802 from tractorcow/3.1-condition-fix

BUG Fixed up SQL table.column identifiers, SQL encoding issue