Workaround for terms of different types comparing as equal.