Oh, I'm not sure what's the problem you have. "no extra hats allowed" is an important bit. You can't solve the first level with two hats for example. There are two ways to solve this level: you can enter the hat, or rabbit can enter it.
Okay solved. There was a behavior I had not noticed at all. When the rabbit enters the hat, the hat itself moves one grid up.