CustomAction isn’t showing for a content type

I ran into this problem today. I created a CustomAction that should show up in the DisplayForm of all Items having a specific content type, but it didn’t.
[...]
Location="CommandUI.Ribbon.DisplayForm"
RegistrationId="0x0100f112dac493564f9e847fcc900037b604"
RegistrationType="ContentType"
[...]

Here’s the simple solution:

It’s causing problems when content types don’t have all capitals in the identifier, both for the definition and when using. So I changed the RegistrationId to the following:
[...]
Location="CommandUI.Ribbon.DisplayForm"
RegistrationId="0x0100F112DAC493564F9E847FCC900037B604"
RegistrationType="ContentType"
[...]