"Smart" Fasteners are usually wrong length!

I'm extremely leery of using "Smart" Fasteners, because they seem awfully dumb. Just now I inserted some M4 screws in my assembly, and they turned out way too short, with about 1 mm of thread engagement. Why does this happen? I know I can edit the length, but the feature isn't very useful if it can't do a better job than this.

SolidworksAssemblies