How to fix the Karazhan dungeon lock (World of Warcraft: Legion)

The dungeon lock for Karazhan is not currently working properly, so continuing on the Karazhan dungeon after initially taking a break is not possible. There is an easy fix for this, and the whole group needs to do the following:

Enter the dungeon without being in a group. This will put you in the correct instance lockout. Everyone in the group will have to do this.

Because you are all on the same instance lock, you will see the other members there without being in a party. Now that you are all inside you can invite everyone to the group, and continue from where you left off.