If this is a chronic problem, you can change the purchasing agreement with the foundry to supply the casting to you in the rough-machined condition to solve the problem. The amount of machine stock to your final machined surface will depend on the size of the casting.
The key is to have the foundy machine the casting or have a sub-contractor in their area machine it, and return it to the foundry for surface inspection. This can be mag particle or liquid penetrant, which is much cheaper than x-ray. The inspection criteria can be from A352 or something like ASME Section VIII, Div 1, Appendix 7, or a tighter criteria that you specify.
If there is a defect on or just under the surface, the foundry will likely find it and have to weld repair it. If it is a large defect, then they will have to stress-relieve it after welding and re-inspect. This will greatly reduce the chance that you will find the defect on final machining.
You will have to pay more for the casting, but if this is a repeated problem, you could end up with a shorter lead time for your casting.
arunmrao is right, this is a problem that is inherrent in the casting process. The trick is to keep the monkeys where they belong.