Modified to use strict inverse equality.