Added better handling of annotations by type pool.