Replaces nested assocs with assoc-in where appropriate.