it about when we mix layers that have timeEnabled=true and timeEnabled=false.

I agree current check is not perfect performance wise, but it's the most robust as it checks the index directly. Checking the db still leaves the possibility that the flage is true but the index does not contain the year attribute. But maybe it's good to let it fail if we have this inconsistency?