Fix last vertex not highlighting
Only mark resources as referenced while capturing a frame