src/serialization: detect more errors on serialize/noserialize annotations