It could be a few things and without seeing your file it is hard to tell which.
1. Check that your selection is solid - you may need to increase the fuzziness
2. What is on that top layer (Layer 0) ?
3. You used the paint bucket tool - which has tolerance settings. A better tool would be to use a solid color fill layer with a mask made from the selection
What happens if you move the yellow layer above layer 0?
I tried deleting the layer 0 but nothing happened