Fixed detection of empty metadata table in otherwise empty schema