Deselect all objects (also on hidden layers)
You can press ` which is usually found immediately to the left of the 1 and directly above TAB.

This will make every layer visible so now using a will function as you would like it to.

Or you could just select something using a mouse/pen click, this will also release any hidden layer selections.