Memo to all you well-meaning law firms out there trying your darnedest to retain and promote women: You are doing it all wrong.

All those marvelous initiatives you’ve been touting—flexible work arrangements, mentoring programs, affinity groups, transition coaching for new moms and the like—are not getting women out of the rut. Worse, some of those efforts could be making it harder for women to succeed.