Use FAILED macro instead of !SUCCEEDED
Fix multiple-inclusion macros