(Edit: I figured it out. See last screen shot)
I set this up in Blender 2.78c but am using Blender Guru's video (blender guru for the basics for the composite.
The bottom lady bug renders great and I catch the shadow. The top lady bug renders semi transparent.
Both lady bugs are on layer 1 and are in pass 1. The cyclinders are on layer 1 and 2 and are on pass 2.
The Rendered passes look great. But, when they hit the divide mix node, it all goes wrong. The bottom lady bug is fine but the top one gets the transparent treatment.
I tried a render with the bottom cylinder moved so that the lady bug hangs off the edge to see if the bug would go transparent. It didn't. It stayed solid. The shadow shifted but I was expecting that.
So the shadow catch works on the bottom bug but the top bug is screwing up somehow.
What am I doing wrong?