Implementing command equality.