On Equivalence and Inconsistency of Answer Set Programs with External Sources