Although the Labour party inflicted a defeat on the government today - as its amendment preventing under-15s from being placed in "secure colleges" was passed by just one vote - the government still has several opportunities to remove parts of the bill they don't like.
Unlike the House of Commons, amendments can be made at third reading in the House of Lords, but this is only if the issue has not been fully considered and voted on during either committee or report stage - which isn't the case here.
What is more likely is that Ministers will try to remove the clause once the bill is sent back to the House of Commons when the bill has completed its remaining stages in the Lords. As this bill began life in the House of Commons, MPs get the final say on the bill's wording.
Although it was a surprising victory, it will be tricky to keep the clause in the bill as it passes through Commons.