Ensure tag data received via API is sane

For #604.