Resolved ambiguous parsing of ";" within @media block (#12923)

Also infer missing semicolon before EOF (required for @debug and @warn
at end of file)

Change-Id: Ib4449a3b8d79ce1b35732d4a33a1a30530bfc91a