A man has been jailed for 18 years over a depraved and brazen attack on a seven-year-old girl in Perth's north east.