Seifert–van Kampen for Closed Subspaces