Ensure there is a join Fixes #4390
Resolve permalink issues Fixes #4400