Yep that's a way to solve it although it's already been made before in other games, hence why I went for the more "original" resolve.
Honestly I thought it was always a possibility that the bird hanging around so close to the cage could end up getting trapped if you locked said cage and the bird got unlucky.