When you have a chest locked with a NBT tag, you can't open it in survival if you don't have the correct named item.
Steps to Reproduce:
1. Use /setblock to place a chest
2. Use /blockdata with {Lock:(whatever you want)}
3. Go in to survival mode
4. Try to open the chest
Where is the bug ?