don't access sel in restack without checking for NULL (multihead crashing bug)