I think there's a bug on the first secret level, in the first section where you throw the shell to the back and then bounce on it to reach a platform with 2 '?' boxes. Once I hit any of those two, the switch doesn't trigger.
Please see below image:
Seems like the switch doesn't always triggers: