Mark Masefield murdered Marie Gladders before his sentence for another killing expired, court hears.