Don't attempt to fetch flags if we don't have any message ids.

Bug: 12551