A Home Office minister says they were examining changing the law to deport recently freed Shabir Ahmed.