Legal loophole that allowed Anjem Choudary to leave jail early will be closed, minister says