Feature #4977: Improve AssetsManager logic and its test case