Implications of non-Markovian dynamics for the Landauer bound