Negatively invariant sets of compact maps and an extension of a theorem of Cartwright