[state] fix local/global coordinate validity checks