Capturing Polynomial Time using Modular Decomposition (Logical Methods in Computer Science, 2019)