trivial: Fix a tiny memory leak when calling as_image_load_filename() more than once
Sort the <component> values alphabetically

This ensures the log messages stay consistent between runs.