You should connect a pin from the Arduino to the reset pin of the 4017, as the library relies on this for resynchronising.
MD_4017_KM(uint8_t numKeys, uint8_t pinClk, uint8_t pinKey, uint8_t pinRst);
The pinRst tells the library which the reset pin is. You can wire it up to any pin as long as you then tell the library the same pin.