Handle extend syntax with media scoping