On graphs with prescribed subgraphs of order $k$, and a theorem of Kelly and Merriell