Bradken was 'on notice' about risks at foundry, says prosecution