Fix exception on top-level annotations, introduced in a0d5b3ac