Pathway switching in templated virus-like particle assembly