Fixed annotation lookup mechanism. There are still non-compilable test cases.