Recently I was reading a post concerning hidden compiler error messages in Dynamics AX2012 on the blog of Joris Degruyter. Nice post since it also made me realize we were facing the same problem! (You can read all about the details in the blog post)
To solve the issue, there was a hotfix known by the KB number 2797772.
Well since we are already using AX2012 R2 this hotfix was not a solution for us since the hotfix is related to AX2012 FP.
After logging the issue with Microsoft and the outstanding work of the support engineers, this issue got escalated and a fix was released very quickly. It goes by the KB number 2822515 and it can be downloaded here:
After installing the fix, your build number should be 6.2.1500.582 which is past the CU1 build number.