Use commondir instead of duplicating LCA

Copied from insert-module-globals