Not a gray area at all.
Selling at a loss in your taxable and buying the same fund in your 401K inside the time limit will trigger a wash sale.
http://support.betterment.com/customer/portal/articles/1595496-how-do-i-safely-use-tlh-if-i-have-external-accounts-
Technically it is a gray area because the IRS has only opined on transactions in an
IRA causing wash sales in a taxable. However, I don't think anybody has ever used this fact to argue that transactions in a 401k/403b/457b do not cause any wash sales. It's still within the realm of possibility that a tax lawyer could successfully argue that 401k/403b/457b's are not subject to the same treatment, as they are written in a completely different portion of the US code and have different implications. However, this is not something that I would bet on, and I definitely recommend that everyone proceed assuming that 401k/403b/457b's are treated the same as IRAs with respect to wash sales until informed otherwise.
OP you said you have similar funds. What we're concerned about is whether they are substantially identical. The law nor the IRS has ever fully defined the term. Many people, myself included, take this to mean that two index funds tracking different indices (even if they are similar) are not substantially identical.
To avoid your issue this is why some people such as myself will use tax loss harvesting pairs. If I wish to TLH VTSAX, total US stock market index, then I will sell that and immediately buy VFIAX and VEXMX (S&P 500 and extended market index) in a 4:1 ratio. Similarly, if I wish to TLH VTIAX (total international stock index), then I will sell that and immediately buy VFWAX and VSS (FTSE total world ex us and FTSE total world ex us small cap) in a 9:1 ratio. This way I still maintain my position in the market and claim the benefits of tax loss harvesting.
*It is definitely not a "requirement" to buy VEXMX or VSS in the scenarios above. I am a bit anal about these things and like to get the full market, whether that's US or international, but you will do just fine without them).