Small refactoring of annotations handling, fixed how empty annotations are handled when mixed with non-empty ones.
Closes ADHI-4892