a potential bug in Layer.

https://github.com/cocos2d/cocos2d-x/issues/2948