Yeah, AFAIK, it's basically a desync issue between your client, and the server (either remote server, or the SSP one rubbing behind your client.
Your client places the block just fine, but the server looks at it and says "nope, you can't do that", removes the block and puts it back in your inventory.
Of course, it might not always tell the client that it's put it back, so you don't see it until you try to do something with the inventory slot it went to.