Add support for != in queries on links

@alazier @jpsim