"Wrong type in blob"

When generating device assemblies, I’m getting a mysterious error, here below. Ideas of what that is?

Failed to generate device specific assemblies:
Wrong type in blob: 12
Unable to read value 0: 12
Invalid blob:
MMP: error MMP0000: 0x81010002
Wrong type in blob: 12
Unable to read value 0: 12
Invalid blob:
MMP: error MMP0000: 0x81010002
Wrong type in blob: 12
Unable to read value 0: 12
Invalid blob:
MMP: error MMP0000: 0x81010002
Wrong type in blob: 12
Unable to read value 0: 12
Invalid blob:
MMP: error MMP0000: 0x81010002
Wrong type in blob: 12
Unable to read value 0: 12
Invalid blob:
MMP: error MMP0000: 0x81010002

Solved but not solved. It happens with a specific kind of custom attribute (not all custom attributes), taking a Type as a parameter. It looks like I cannot define and use custom attributes like that (just defining compiles fine, applying it to a class does not).

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
public class CustomAttribute : Attribute
{
    public Type Param { get; private set; }
    public CustomAttribute(Type param)
    {
        Param = param;
    }
}