Tests and refinments for is_local