Surely you needn't feel like you're plagiarizing, just give credit. The credit won't be any less deserved next week or next year, even if you "Know" you'd definitely have fixed this without prompting, nobody else knows that, and so it looks like you avoided giving credit where it was due, so, don't do that.
Nobody's asking for royalties, so "Shout out to @SomeoneOnTwitter for reminding me" is enough.