The notification you mention appears often in my games when upgrading a unit that requires a resource to a unit which requires the same resource. This happens especially when I have 0 of that resource: I have used all of that resource for my existing units.
Trust the indication at the top of the screen. The notification should not appear in those situations. It should be fixed, but it only causes temporary concern for me. However, that was a great concern for me the first few times I experienced it.