check_connection function

Internal: Check whether two indicators belong to the same construct.