I just noticed your second comment for some reason, I must be distracted today! 

yeah, I was wondering about the performance there too. your approach might be better, same error messages, etc. just parsing front matter period isn't great for performance, this just makes me want to implement benchmarking for this even more.