Fix GetSize so all implementations return -1 on error.