Activation of topological insulator phase in kagomé-type bilayers by interlayer coupling: The cases of Ni(CO)4 and Pd(CO)4