Retirement tax questions

@Opus17,  unfortunately, it appears that advice is incorrect.  After being laid off, I rolled the remaining 401k balance to a new IRA I opened with Ameritrade.  And I received a 1099R from from Vanguard with the outstanding loan amount coded as M7 in Box 7.  I just talked to Ameritrade and they said they have no way of accepting a loan payment for the loan and I would have to go back and talk to Vanguard.  Vanguard told me they couldn't accept any payment for it and that I would need to talk to the IRS about any tax implications.  The IRS went through a bunch of questions with me and concluded that the WHOLE loan amount is FULLY TAXABLE and that the Tax Cuts & Jobs Act payback extension does not apply because Vanguard and my former employer (or anybody else's employer & investment company like Vanguard)  DECIDE THE  RULES about payback, not the IRS!  Talk about a bum deal.  This means I'll be paying a huge tax bill. 

Live and learn - always consult a TAX PROFESSIONAL about matters like these.