Church will regret rejection of gays as well as slavery, says bishop