It's actually working perfectly. That is not a bug, but it's by design, so that people do not delete all messages, thinking that they are deleting only those on the screen.
"All" can mean different things.
You can change that behavior in Settings -> message list -> 'Select All" means .....