To explain the discrepancies in the text, Garsiel not only says that not only are they the same Elhanan, but also concludes "that Elhanan is David’s previous name before he became king."
Garsiel explains the inconsistencies by stating that Elhanan is one and the same as the other Elhanan, and also posits that Elhanan was David's former name before he became king.